Symbol Index

. A B C D E F G H I L M N O P R S T U V W Y _
.
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
W
Y
_

File Documentation

Full Source

Show Source

;	
    bank &C0
; curves and graphics	
 	org &800
c0_800_start
TAB_MOVES_B incbin "files/MOVEPBOT.TAB"
	align 256
TAB_MOVES_T incbin "files/MOVEPTOP.TAB"
	align 256	
SPRITE_HL   
	incbin "files/HVYNZL.WIN"
	align 256
SPRITE_HR	
	incbin "files/HVYNZR.WIN"
	align 256
SPRITE_LL  
	;incbin "files/LMODE0I.WIN"
	incbin "files/LVYNZL4.WIN"
	align 256
SPRITE_LR
	incbin "files/LVYNZR4.WIN"
;  
	align 256  
SPRITE_B  
	incbin "files/BVYNZ.WIN"
SPRITE_H_LOGO	
    incbin "files/HLOGO.WIN"	
SPRITE_B_LOGO  
    incbin "files/BFINAL.WIN" ; LOGO.WIN"	
SPRITE_L_LOGO 
    incbin "files/LFINAL.WIN" 
;	align 256
LOVERS ;incbin "files/LOVERS.WIN"
;
ORNY    incbin "files/ORNY2.WIN"
YTES    incbin "files/YTES3.WIN"  
OVERS   incbin "files/OVERS3.WIN"  

COEUR5  incbin "files/COEUR5F.WIN"
COEUR6  incbin "files/COEUR6F.WIN"
;

    assert  $ <= 0x4000
c0_800_stop
c0_800_length equ c0_800_stop - c0_800_start




	org &8000
	run &8000
c0_8000_start
	read "intro_code.asm"
c0_8000_length equ $-c0_8000_start


	bank &C4	
;	
	; BUG there is a bug in BASM in the handling of the BANK directive...
	;     in the meanwhile, we have to use a warkaround to ge taccurate size
	org &4000
c4_start	
	terminok = load("files/FINALPIC.SCR")
	c4_length = list_len(terminok)
	db terminok 
c4_stop = c4_start + c4_length
;	incbin "files/TERMINOK.SCR"
;	assert $< 0x8000
;c4_stop
;c4_length equ $ - c4_start
;


;
	bank &C6
; music	
 	org &4000
c6_start
	read "music.asm"
c6_stop
; c6_length equ $-c6_start ; XXX this seems buggy
c6_length equ c6_stop - c6_start
;

    print "C4_start=", {hex}c4_start
	print "C4_stop=", {hex}c4_stop
	print "C4 length=", {hex}c4_length
	print "C6 length=", {hex}c6_length
	print "C0_800 length=", {hex}c0_800_length
	print "C0_8000 length=", {hex}c0_8000_length

    bank &C0
	save "C0.800", c0_800_start, c0_800_length
	save "C0.8000", c0_8000_start, c0_8000_length

    bank &C4
	save "C4.4000", c4_start, c4_length

	bank &C6
	save "C6.4000", c6_start, c6_length


	assert c4_length <= 0x4000
	assert c6_length <= 0x4000

Full Source

Show Source
	include once "../linking/src/demosystem/common.asm" 
	include once "../linking/src/demosystem/public.asm" 
LOAD_THE_LOADER equ false
SELECTED_CRTC   equ 1
; 
HEIGHT_HBL_FLASH equ 48
HEIGHT_HBL_MAIN equ 48+4-1+10-3-12
HEIGHT_HBL_HORNY equ 22
HEIGHT_HBL_HORNY2 equ 10+4
HEIGHT_HBL_HORNY3 equ 6+1
HEIGHT_HBL_BYTES equ 30+6-1-1
HEIGHT_HBL_BYTES2 equ 6-1
; all is displayed in &4000 page
;
SPRITE_VIDE equ &4000
MODE2 equ &8E
MODE0 equ &8C
R1 				equ 48
R2 				equ  &32 ; &32 for fullscreen
R2_LOGO         equ &2e-2-1
SCREEN_WIDTH 	equ R1*2
TABLINE_96 		equ END_CODE
TABLINE_80 		equ END_CODE+&200
SPRWIDTH 		equ 16
SPRHEIGHT       equ 48
WIDTH_OVERS     equ 34
;

BORDER_TOP		equ 93; 68  ;69 ;&5D
BORDER_BOTTOM 	equ 88   ;  71 ; 
;
INK0 		equ 84 ; 88 
INK1 		equ BORDER_BOTTOM
INK1_FLASH  equ 95 ; 95
;INK15       equ 92
BLACK 		equ 84
;
COLOR1_BYTES_LOGO equ 91

RASTER_TOP_BOTTOM equ BORDER_TOP*256+BORDER_BOTTOM ; &585D
RASTER_BOTTOM_TOP equ BORDER_BOTTOM*256+BORDER_TOP ; &5D58
RASTER_TOP_TOP    equ BORDER_TOP*256+BORDER_TOP ; &5858

BK_MUSIC equ &c6
;	
;
	nolist
;
; code start in &8000
; 
	di
	ld hl,&c9fb
	ld (&0038),hl
	im 1
	ld sp, &c000
; 
 ; breakpoint
;
   ld a,i

   cp 3
   jr z,CRTC_3_4_ADAPTATION
   cp 4
   jr nz,START_AFTER_CRTC_ADAPTATION
; 168 lines  
CRTC_3_4_ADAPTATION
;
; still useful?
; 
     ld a,29
     ld (NB_BGD_LINE1+1),a 
     ld a,47-30
     ld (NB_BGD_LINE2+1),a 
     ld a,61+1-30
     ld (NB_BGD_LINE3+1),a


  ld hl,&5aDD
 ld (HIDE_CORRUPTED_BYTE1+1),HL     ;  ld hl,&5aDD
  ld hl,&4d1d
 ld (HIDE_CORRUPTED_BYTE2+1),HL 

  ld hl,&4000
  ld (HIDE_CORRUPTED_BYTE3+1),hl 


START_AFTER_CRTC_ADAPTATION
	call generate_line_fullscreen
	ld hl,&c000
	ld de,TABLINE_80+2
	ld (TABLINE_80),hl
	ld hl,TABLINE_80
	ld bc,510
	LDIR

	call generate_line_standart
;	
;

	ld bc,&7f00+BK_MUSIC
	out (c),c
;	
;	di			; coz FapInit makes heavy use of SP
 	   ld	a,HiFapBuff 	; High byte of the decrunch buffer address.
 	   ld	bc, FapPlay     ; Address of the player binary.
 	   ld	de, ReturnAddr  ; Address to jump after playing a song frame.
 	   ld	hl, FapData     ; Address of song data.
 	   call    FapInit

	LD	BC,#7FC0
	OUT	(C),C

 	   ei
;
	DS_SECURE_WAIT_VSYNC()

			ld bc,&bc07		
			out (c),c
			ld bc,&bd00+&1E-2
			out (c),c
;
			ld bc,&bc01		
			out (c),c
			ld bc,&bd00+40
			out (c),c
;
			ld bc,&bc02
			out (c),c
			ld bc,&bd00+&2e
			out (c),c

			ld bc,&bc06
			out (c),c
			ld bc,&bd00+21
			out (c),c


;
PREPARE_FLASH_SCREENS

            call DISPLAY_BACKGROUND1 ; _FLASH
			call DISPLAY_BACKGROUND2
			call DISPLAY_BACKGROUND3
			call DISPLAY_BACKGROUND4
			call DISPLAY_BACKGROUND5
			call DISPLAY_BACKGROUND6

			ld hl,TABLINE_96+120
	        ld bc,SPRITE_HL
	        ld a,30-5
			call DISPLAY_SPRITE_SHORT

            ld hl,TABLINE_96+120
            ld bc,SPRITE_LR
            ld a,50+2+2
	        call DISPLAY_SPRITE_SHORT

            ld hl,TABLINE_96+240-16+8
            ld bc,SPRITE_B ; SPRITELL
            ld a,40
	        call DISPLAY_SPRITE_SHORT
;
            ld hl,HBL_ZONE_02
            ld (ROUTINE2+1),hl
			ld a,84
	        ld (pokborder+1),a

SEQUENCE_SPRITES_FLASH
;
; FRAME 1 = HBL for MODE 2 / MODE 0
;
STATIC_FLASH_FRAME_1
            DS_SECURE_WAIT_VSYNC()
    ;
 		
        	ld hl,ini_crtc_flash1
			call put_crtc
			ei
			ld bc,&7f8e
		    out (c),c	
	       	ld hl,TCOL_FLASH1
	     	call COLOR
			call PLAY_MUSIC_FAP
           
            halt
            halt

			ld b,36-2-1
WAITF1   	defs 60,0 ; 60 Nops
      		djnz WAITF1 
            call MAIN_HBL_ZONE
;       
; FRAME 2 = MODE 1 only
;
STATIC_FLASH_FRAME_2
            DS_SECURE_WAIT_VSYNC()
;
        	ld hl,ini_crtc_flash2
			call put_crtc
			ei
            ld bc,&7f8e
            out (c),c
			ld hl,TCOL_FLASH2
	     	call COLOR
			call PLAY_MUSIC_FAP
;
            halt
            halt
;
			ld b,36-2
WAITF2   	defs 60,0 ; 60 Nops
      		djnz WAITF2
;			
			ld bc,&7f8d
            out (c),c
			ld hl,&0100+INK1_FLASH
			out (c),h
			out (c),l
;			
; unsused, was useful for the first version without HBL
POK_MODE   ld bc,&7f8e
;          out (c),c
;
ALTERNATE_MODE_SPRITE
TIMER_FLASH       ld a,1
                  dec a
				  ld (TIMER_FLASH+1),a
				  or a
				  jr nz,END_SCENARIO

NEXT_SCENARIO_POSITION

POS_TABLE_FLASH    ld hl,TABLE_FLASHING_MOVES
                    ld a,(hl)
					or a
					jr nz,SAME_SCENARIO
RESET_SCENARIO
                 ld hl,TABLE_FLASHING_MOVES
				 ld (POS_TABLE_FLASH+1),hl
                 ld a,(hl)
SAME_SCENARIO     
                 ld (POK_MODE+1),a
                 inc hl
                 ld a,(hl) 
				 ld (TIMER_FLASH+1),a
                 inc hl
				 ld e,(hl)
				 inc hl
				 ld d,(hl)
				 ld (POK_SPRITE_LEFT+1),de
                 inc hl
				 ld e,(hl)
				 inc hl
				 ld d,(hl)
				 ld (POK_SPRITE_RIGHT+1),de
                 inc hl
				 ld a,(hl)
				 ld (POS_SPRITE_LEFT+1),a
				 inc hl
				 ld a,(hl)
				 ld (POS_SPRITE_RIGHT+1),a
				 inc hl
				 ld (POS_TABLE_FLASH+1),hl

END_SCENARIO
;
; displays H
                        ld hl,TABLINE_96+120+2-2
POK_SPRITE_LEFT	        ld bc,SPRITE_HL
POS_SPRITE_LEFT	        ld a,30
	                     call DISPLAY_SPRITE_SHORT
; displays L
                         ld hl,TABLINE_96+120-2
POK_SPRITE_RIGHT	     ld bc,&4000 ; SPRITELL
POS_SPRITE_RIGHT	     ld a,50
	                     call DISPLAY_SPRITE_SHORT


TIMER_SPRITES_FLASH ld hl,&150 ; +200
				dec hl
				ld (TIMER_SPRITES_FLASH+1),hl	
;		
			ld a,h
			or a
			jp nz,STATIC_FLASH_FRAME_1
;
PREPARE_MOVING_SRITES
; 
   ld hl,LINE_HBL_MODE1
   ld (POK_MIDDLE_LINE1+1),hl

   ld hl,LINE_MODE2_PEN1_MODE0_PEN14 
   ld (POK_BOTTOM_LINE1+1),hl
; 
; displays background  
; displays B character
;
TRANSITION1
            DS_SECURE_WAIT_VSYNC()

         	ld hl,ini_crtc_flash1
			call put_crtc
			ei
			ld bc,&7f8e
		    out (c),c	
	       	ld hl,TCOL_FLASH1
	     	call COLOR
			call PLAY_MUSIC_FAP

SCENARIO_TIMER_TRANSITION1 	ld a,1                  ; 2
				dec a                   ; 1
				ld (SCENARIO_TIMER_TRANSITION1+1),a ; 4
				jp nz,LEAVE_SCENARIO_MANAGEMENT_TRANS1


NEW_SCENARIO1
POS_TAB_SCE1 	ld hl,TAB_SCENARIO_TRANSITION1
	   		 ld a,(hl)
	  		  or a
		    jr nz,PAS_FIN_TAB1
;
               jr SEQUENCE_HBL_MOVING_SPRITES
PAS_FIN_TAB1

	    ld (SCENARIO_TIMER_TRANSITION1+1),a


		inc l
		ld e,(hl)
	    inc l
	 	 ld d,(hl)
		ld (ROUTINE_TRANSITION1+1),de
		inc l

		ld (POS_TAB_SCE1+1),hl
;
LEAVE_SCENARIO_MANAGEMENT_TRANS1 

ROUTINE_TRANSITION1 call DISPLAY_BACKGROUND1

       jp TRANSITION1
;

DISPLAY_B_TRANSITION1
	ld hl,TABLINE_96+120
	ld bc,SPRITE_B
	ld a,40
	call DISPLAY_SPRITE_SHORT

    ld hl,HBL_ZONE_012
    ld (ROUTINE2+1),hl
	ld a,BORDER_BOTTOM
	ld (pokborder+1),a
	ret

; ****************************************************************************************************
SEQUENCE_HBL_MOVING_SPRITES

            ld hl,HBL_ZONE_012
            ld (ROUTINE2+1),hl
;
MAIN_LOOP
	DS_SECURE_WAIT_VSYNC()
;
   ld hl,&5aDD
   ld (hl),0
   ld hl,&4d1d
   ld (hl),0

    ld hl,ini_crtc_moving
	call put_crtc
;		
	ei
;
MODE_TOP ld bc,&7f8C
		out (c),c	
		ld hl,TCOL_MAIN
		call COLOR
;	
POK_RASTER0	 ld hl,&010f
POK_RASTER0A ld de,RASTER_BOTTOM_TOP ; &5D58

			ld hl,&010f
			ld de,RASTER_TOP_TOP ; &5858
			out (c),h
			out (c),d
			out (c),l
			out (c),e
; *************************************
	    	call PLAY_MUSIC_FAP

			call SCENARIO

;			
ROUTINE1   call DISPLAY_MOVING_SPRITE1

OFFSET_MIDDLE ld hl,&1000
			ld bc,&bc0c
			out (c),c
			inc b
	;		dec c
			out (c),h
			dec b
			inc c
			out (c),c
			inc b
		;	dec c
			out (c),l	


		halt
;
        call MAIN_HBL_ZONE
;
PART       call STATIC_SPRITES
	    	ld b,15-1 
WAIT3     defs 60,0 ; 60 Nops
      	 djnz WAIT3


ROUTINE3 call DISPLAY_MOVING_SPRITE2


		EI

   call SPACEKEY_TEST

;
		JP NC,EXIT_PART            		

	include once "../linking/src/limited_duration.asm"
	CHECK_IF_PART_IS_OVER()
	jp z, EXIT_PART
;
TIMER_ROTATION ld hl,&260+&100+80+40+80+160; +200
				dec hl
				ld (TIMER_ROTATION+1),hl	
;		
	     		ld a,h
		     	or a
                jp nz,MAIN_LOOP


SEQUENCE_WORDS_DISPLAY
            ld hl,&8d8c
			ld (POK_M2X+1),hl
			ld hl,&7f8e
			ld (POK_M1X+1),hl	
;
; displays H,B, L
                         call DISPLAY_H_LOGO
;						
                         call DISPLAY_B_LOGO 

						  call DISPLAY_L_LOGO 

	;		breakpoint
MAIN_WAIT_DISPLAY
	
			DS_SECURE_WAIT_VSYNC()
;			
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
;					
			halt

			ld b,32
WAIT_WAIT		defs 60,0;
			djnz WAIT_WAIT
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO
			ei
           call RASTERS_LOVERS	
TIMER_WAIT      ld hl,&160 ; +200
				dec hl
				ld (TIMER_WAIT+1),hl	
;		
	     		ld a,h
		     	or a
                jp nz,MAIN_WAIT_DISPLAY


MAIN_ORNY_DISPLAY
	
			DS_SECURE_WAIT_VSYNC()
 ;
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
;					
			halt

			ld b,32
WAIT1O		defs 60,0;
			djnz WAIT1O
;  
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO

            ei
			  call RASTERS_LOVERS	
            call DISPLAY_ORNY

;


TIMER_ORNY      ld hl,&120 ; +200
				dec hl
				ld (TIMER_ORNY+1),hl	
;		
	     		ld a,h
		     	or a
                jp nz,MAIN_ORNY_DISPLAY

MAIN_YTES_DISPLAY
	
			DS_SECURE_WAIT_VSYNC()
 ;
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
;					
			halt

			ld b,32
WAIT1Y		defs 60,0;
			djnz WAIT1Y
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO
            ei
			  
		   call RASTERS_LOVERS	

           call DISPLAY_YTES



TIMER_YTES      ld hl,&120 ; +200
				dec hl
				ld (TIMER_YTES+1),hl	
;		
	     		ld a,h
		     	or a
                jp nz,MAIN_YTES_DISPLAY
;
; OVERS is displayed with 3 routines!!!
;
MAIN_OVERS_DISPLAY1
	
			DS_SECURE_WAIT_VSYNC()
 ;
 ;;  breakpoint
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
;					
			halt

			ld b,32
WAIT1OV		defs 60,0;
			djnz WAIT1OV
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO

            ei
			  call RASTERS_LOVERS	
			halt
     ;       halt
			ld b,8+6+1+1+13
WAIT1OV2		defs 60,0;
			djnz WAIT1OV2

; lOVERS

	ld a,WIDTH_OVERS 
    ld (WIDTH_SPRITE+1),a
	ld a,45
	ld (POSX_SPRITE+1),a
; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,21-8
	ld bc,OVERS
	ld hl,TABLINE_80+220+40+12+2+4

    call DISPLAY_SPRITE_80BYTES

MAIN_OVERS_DISPLAY2
	
			DS_SECURE_WAIT_VSYNC()
 ;
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
; overs2	
	ld a,10+2
	ld bc,OVERS+(13*WIDTH_OVERS)
	ld hl,TABLINE_80+220+40+12+26+2+4

    call DISPLAY_SPRITE_80BYTES
 
			halt

			ld b,32
WAIT1OV3		defs 60,0;
			djnz WAIT1OV3
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO

            ei
			  call RASTERS_LOVERS	
; overs3
    ld a,58-21-10-1-2+6
	ld bc,OVERS+(25*WIDTH_OVERS)
	ld hl,TABLINE_80+220+40+12+26+24+2+4

    call DISPLAY_SPRITE_80BYTES

TIMER_OVERS ld hl,&160
				dec hl
				ld (TIMER_OVERS+1),hl	
;		
			ld a,h
			or a
			jp nz,MAIN_OVERS_DISPLAY2


SEQUENCE_LOGO_DISPLAY

MAIN_LOGO_DISPLAY_RAIN
	
			DS_SECURE_WAIT_VSYNC()
 ;
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c
;					
			halt

			ld b,32
WAIT1		defs 60,0;
			djnz WAIT1
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO
           	ei

         
          call RASTERS_LOVERS	
	
;     

            di
	        call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			  call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			 call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			 call RAIN_CODE
			call RAIN_CODE
			call RAIN_CODE
			 call RAIN_CODE
		
			ei
		
          call SPACEKEY_TEST

		JP NC,EXIT_PART 

TIMER_LOGO_DISPLAY ld hl,&200
				dec hl
				ld (TIMER_LOGO_DISPLAY+1),hl	
;		
			ld a,h
			or a
			jp nz,MAIN_LOGO_DISPLAY_RAIN
;
; breakpoint
; A- TO REMOVE WHEN SCREEN IS OK
; displays H,L
                   ;      call DISPLAY_H_LOGO
;						
                    ;     call DISPLAY_B_LOGO 
  ; call DISPLAY_ORNY
  ; call DISPLAY_YTES
;   
; Z - TO REMOVE WHEN SCREEN IS OK   
;

;		breakpoint


MAIN_ANIMATION_HEART
	
			DS_SECURE_WAIT_VSYNC()
 ;
 ; breakpoint
            ld hl,ini_crtc_logo
			call put_crtc
;	
            ld bc,&7f10
			out (c),c
			ld a,84
			out (c),a
;			
			ld bc,&7f8c
			out (c),c

            call SCENARIO_SPR  

			halt

			ld b,32
WAITH		defs 60,0;
			djnz WAITH
;
            ld hl,TCOL_LOGO
			call COLOR
			call PLAY_MUSIC_FAP

			defs &16-14,0
			call HBL_ZONE_LOGO
           	ei

        call RASTERS_LOVERS	
;   
ROUTINE_DISPLAY_HEART call ROUTINE_DISPLAY_HEART
 
          call SPACEKEY_TEST

		JP NC,EXIT_PART 

TIMER_ANIMATION_HEART ld hl,&260+&260
				dec hl
				ld (TIMER_ANIMATION_HEART+1),hl	
;		
			ld a,h
			or a
			jp nz,MAIN_ANIMATION_HEART
      
		jp EXIT_PART



DISPLAY_HEART6
      ld bc,COEUR6
	  JR DISPLAY_H56

DISPLAY_HEART5
       ld bc,COEUR5
	   JR DISPLAY_H56

DISPLAY_HEART4
       ld bc,COEUR4
DISPLAY_H4
	ld a,12 
    ld (WIDTH_SPRITE+1),a
	ld a,43+1
	ld (POSX_SPRITE+1),a
; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,48-4-5
	ld hl,TABLINE_80+220+40+12+12+2+8-6

    call DISPLAY_SPRITE_80BYTES
	ret	   
;
DISPLAY_H56
	ld a,15 
    ld (WIDTH_SPRITE+1),a
	ld a,43
	ld (POSX_SPRITE+1),a
; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,48-4+1
	ld hl,TABLINE_80+220+40+12+12+2

    call DISPLAY_SPRITE_80BYTES
	ret
DISPLAY_HEART3
      ld bc,COEUR3
	  JR DISPLAY_H123

DISPLAY_HEART2
       ld bc,COEUR2
	   JR DISPLAY_H123

DISPLAY_HEART1
       ld bc,COEUR1
;
DISPLAY_H123
	ld a,11 
    ld (WIDTH_SPRITE+1),a
	ld a,43+1
	ld (POSX_SPRITE+1),a

    ld a,48-4-5+3
	ld hl,TABLINE_80+220+40+12+12+2+8-6+6-2

    call DISPLAY_SPRITE_80BYTES
	ret
;
RASTERS_LOVERS
            ld bc,&7f00+7
			out (c),c
			ld a,&55
			out (c),a
			ld bc,&7f00+9
			out (c),c
			ld a,69
			out (c),a		
		    ld bc,&7f00+1 
			out (c),c
			ld a,&4d
			out (c),a	
			ret

SPACEKEY_TEST

	    LD	BC,#F40E
        OUT	(C),C
        LD	BC,#F6C0
        OUT	(C),C
;  XOR	A
;  OUT	(C),A
  		defb &ed,&71
        LD	BC,#F792
        OUT	(C),C
        LD	BC,#F645
        OUT	(C),C
        LD	B,#F4
        IN	A,(C)
        LD	BC,#F782
        OUT	(C),C
;  LD	BC,#F600
;  OUT	(C),C
		dec b
		defb &ed,&71
;		
        RLA	
		ret

;

MAIN_HBL_ZONE
           defs 64-5,0
			defs 3,0
	 		ld b,7
WAIT   		  defs 60,0 ; 60 Nops
      		 djnz WAIT 
			
;
; ADAPTATION PLUS avec -1 

       xor a
HIDE_CORRUPTED_BYTE1       ld hl,&5504 ; &5aDD
       ld (hl),a
  	   
HIDE_CORRUPTED_BYTE2        ld hl,&5504
       ld (hl),a

       dec a ; a =&ff

HIDE_CORRUPTED_BYTE3        ld hl,&5add
       ld (hl),a

ROUTINE2 	call HBL_ZONE_012		


MODE_BOTTOM ld bc,&7f8e
			out (c),c

pokborder		ld hl,&1000+BORDER_BOTTOM
			out (c),h 
			out (c),l			
;			
            ret   	


put_crtc
	LD	bc,#bd00+7
reg_crtc
	OUTI	
	INC	b
	INC	b
	OUTI	
	DEC	c
	JR	nz,reg_crtc
	RET	
;
ini_crtc_main	DB 	1,R1 
ini_crtc_load   DB	2,R2
		  	DB  6,21
			DB  7,&1E-2
		    DB	9,7
			DB  12,&30
            DB  13,&00
			defb 1,0

ini_crtc_moving	DB 	1,R1 
		       DB	2,R2
		  	DB  6,21
			DB  7,&1E-2
		    DB	9,7
			DB  12,&10
            DB  13,&00

ini_crtc_flash1 	DB 	1,R1 
		       DB	2,R2
		  	DB  6,14-1
			DB  7,&1E-2
		    DB	9,7
		 ;   defb 3,&88
			DB  12,&10
            DB  13,&00

ini_crtc_flash2	DB 	1,R1 
           ; defb 3,&88
		     DB	2,R2
		  	DB  6,14-1
			DB  7,&1E-2
		    DB	9,7
			DB  12,&11  ; 12th line
            DB  13,&80-&30
;
ini_crtc_logo	DB 	1,40
		       DB	2,R2_LOGO
		  	DB  6,25
			DB  7,&1E-2-2
		    DB	9,7
			DB  12,&30
            DB  13,&00

PLAY_MUSIC_FAP	
; 620 NOPS for INTRO
		di
		ld bc,&7f00+BK_MUSIC
		out (c),c
    	ld	(RestoreSp), sp	; Save our precious stack-pointer
    	jp	FapPlay		; Jump into the replay-routine
ReturnAddr:		; Return address the replay-routine will jump back to
RestoreSp equ $+1

    	ld	sp, 0	 	; Restore our precious stack-pointer
        ei			; We may enable the maskable interrupts again
  		nop
		ld bc,&7fc0
		out (c),c
		ret
;
; ******************************************************************
;
SCENARIO
               
SCENARIO_TIMER 	ld a,1                  ; 2
				dec a                   ; 1
				ld (SCENARIO_TIMER+1),a ; 4
				jp nz,LEAVE_SCENARIO_MANAGEMENT   ; 2
;
NEW_SCENARIO
POS_TAB_SCE 	ld hl,TAB_SCENARIO
	   		 ld a,(hl)
	  		  or a
		    jr nz,PAS_FIN_TAB
;
	 		   ld hl,TAB_SCENARIO_LOOP
	  			  ld a,(hl)	
PAS_FIN_TAB


	    ld (SCENARIO_TIMER+1),a


		inc l
		ld e,(hl)
	    inc l
	 	 ld d,(hl)
		ld (PART+1),de
		inc l

		ld (POS_TAB_SCE+1),hl
    

LEAVE_SCENARIO_MANAGEMENT

;
		ret
;
SCENARIO_SPR
               
SCENARIO_SPR_TIMER 	ld a,1                  ; 2
				dec a                   ; 1
				ld (SCENARIO_SPR_TIMER+1),a ; 4
				jp nz,LEAVE_SCENARIO_SPR_MANAGEMENT   ; 2
;
NEW_SCENARIO_SPR
POS_TAB_SCE_SPR 	ld hl,TAB_SCENARIO_SPR
	   		 ld a,(hl)
	  		  or a
		    jr nz,PAS_FIN_TAB_SPR
;
	 		   ld hl,TAB_SCENARIO_SPR
	  			  ld a,(hl)	
      	;	  jr PAS_FIN_TAB+7	
;
PAS_FIN_TAB_SPR


	    ld (SCENARIO_SPR_TIMER+1),a
;
		inc l
		ld e,(hl)
	    inc l
	 	 ld d,(hl)
		ld (ROUTINE_DISPLAY_HEART+1),de
		inc l
		ld (POS_TAB_SCE_SPR+1),hl
    

LEAVE_SCENARIO_SPR_MANAGEMENT

;
		ret

; 
generate_line_fullscreen LD HL,#C000 
	    LD de,#C000+SCREEN_WIDTH 
	    LD bc,#0800 
	    LD iy,TABLINE_96
;        LD ix,TABLINE_96+&100
; 
	    ld a,170 ; XOR A  ; a=256 lines
;
loop    LD (iy+#00),l
        res 7,h       ; all addresses in page &4000
	    LD (iy+#01) ,h
		inc iyl
		inc iy
        set 7,h
;
		ADD hl,bc 
		JR nc,nocarry 
;	
		ADD hl,de 
nocarry; INC ixl
;	INC iyl 
		DEC a
		JR nz,loop 
		ret
;		
generate_line_standart LD HL,#C000 
	    LD de,#C000+80
	    LD bc,#0800 
	    LD iy,TABLINE_80
;
	    ld a,200 ; XOR A  ; a=256 lines
;
.loop    LD (iy+#00),l
;        res 7,h       ; all addresses in page &4000
	    LD (iy+#01) ,h
		inc iyl
		inc iy
;        set 7,h
;
		ADD hl,bc 
		JR nc,.nocarry 
;	
		ADD hl,de 
.nocarry; INC ixl
;	INC iyl 
		DEC a
		JR nz,.loop 
		ret

HACK_BACK
	    LD	BC,#F40E
        OUT	(C),C
        LD	BC,#F6C0
        OUT	(C),C
;  XOR	A
;  OUT	(C),A
  		defb &ed,&71
        LD	BC,#F792
        OUT	(C),C
        LD	BC,#F645
        OUT	(C),C
        LD	B,#F4
        IN	A,(C)
        LD	BC,#F782
        OUT	(C),C
;  LD	BC,#F600
;  OUT	(C),C
		dec b
		defb &ed,&71
;		
        RLA	
;
		JP C,GO_HACK


		ld hl,BYTEX+1
		ld a,(hl)
		inc a
		ld (hl),a


GO_HACK

		di
;		
		ld (STORE_SPX+1),sp
;
		ld sp,TABLINE_96+100+8
;
		ld b,50-3
BYTEX		ld a,0
			ld de,36
LOOP_FILLX
	

		pop hl 
		add hl,de
		ld (hl),a	
	;	exx	
		djnz LOOP_FILLX

STORE_SPX ld sp,&1000
		ei
		ret

;
DISPLAY_BACKGROUND1
		di
;		
		ld (STORE_SP1+1),sp
		ld sp,TABLINE_96

NB_BGD_LINE1		ld b,30
LOOP_FILL1
		exx
		ld hl,LINE_MODE2_PEN1_MODE0_PEN14
		pop de
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL1
;
      ld (POK_SP2+1),sp
;
STORE_SP1 ld sp,&1000
		ei
		ret
;		
DISPLAY_BACKGROUND2
		di
;		
		ld (STORE_SP2+1),sp
POK_SP2		ld sp,TABLINE_96
;	
;
     		ld b,30
LOOP_FILL2
		exx
		ld hl,LINE_MODE2_PEN1_MODE0_PEN14
		pop de
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL2
        ld (POK_SP3+1),sp

STORE_SP2 ld sp,&1000
		ei
		ret

DISPLAY_BACKGROUND3
		di
;		
		ld (STORE_SP3+1),sp
POK_SP3	 ld sp,TABLINE_96
;	

NB_BGD_LINE2		ld b,47-30
LOOP_FILL3
		exx
POK_MIDDLE_LINE1		ld hl,LINE_MODE2_PEN1_MODE0_PEN14 ; LINE_HBL_MODE1 when HBL are ON
 		pop de 
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL3
;		
        ld (POK_SP4+1),sp
;
STORE_SP3 ld sp,&1000
		ei
		ret		

DISPLAY_BACKGROUND4
		di
;		
		ld (STORE_SP4+1),sp
POK_SP4	 ld sp,TABLINE_96
;	
  		ld b,30
LOOP_FILL4
		exx

        ld hl,(POK_MIDDLE_LINE1+1) 
  		pop de 
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL4
;		
        ld (POK_SP5+1),sp
;
STORE_SP4 ld sp,&1000
		ei
		ret		

DISPLAY_BACKGROUND5
		di
		ld (STORE_SP5+1),sp
;		
POK_SP5	 ld sp,TABLINE_96
;
NB_BGD_LINE3		ld b,31
LOOP_FILL5
		exx
POK_BOTTOM_LINE1	ld hl,LINE_MODE1_EMPTY_PEN0   ;  LINE_MODE2_PEN1_MODE0_PEN14 when HBL are ON
		pop de
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL5
;
         ld (POK_SP6+1),sp
;		 
STORE_SP5 ld sp,&1000
		ei
		ret
;
DISPLAY_BACKGROUND6
		di
		ld (STORE_SP6+1),sp
;		
POK_SP6	 ld sp,TABLINE_96

;
;NB_BGD_LINE5		
             ld b,30
LOOP_FILL6
		exx
        ld hl,(POK_BOTTOM_LINE1+1) 
;		
		pop de
		ld bc,96		
		ldir
		exx	
		djnz LOOP_FILL6
;
STORE_SP6 ld sp,&1000
		ei
		ret


;
LINE_MODE1_EMPTY_PEN0  defs 96,0
LINE_MODE2_PEN1_MODE0_PEN14 defs 96,255
LINE_HBL_MODE1 defs 34,255
					defs 30,0
					defs 32,255; &3F
;					

DISPLAY_SPRITE_80BYTES

	di
; a = HEIGHT	
; hl = SPRITE 
; bc = ADDRESSES TABLE
;	
	ld (STORE_SPZ+1),sp
	ld sp,hl
;
	ld l,c
	ld h,b
;

LOOP_SPRITE    
;	
	ex de,hl
	pop hl

POSX_SPRITE ld bc,00
	add hl,bc	
	ex de,hl

WIDTH_SPRITE ld bc,20

	ldir
    dec a
	jr nz,LOOP_SPRITE 
;
STORE_SPZ ld sp,000
;
	ei
	ret

DISPLAY_SPRITE_SHORT
	di
; hl = SPRITE 
; bc = ADDRESSES TABLE
;	
	ld (STORE_SP+1),sp
	ld sp,hl
;
	ld l,c
	ld h,b
    jp SHORT
 

DISPLAY_SPRITE
	di
; hl = SPRITE 
; bc = ADDRESSES TABLE
;	
	ld (STORE_SP+1),sp
	ld sp,hl
;
	ld l,c
	ld h,b
;	
    repeat 2
;	
	ex de,hl
	pop hl

	ld c,a
	ld b,0
	add hl,bc	
	ex de,hl
	
;
	repeat SPRWIDTH
	ldi
	rend
;	
	rend 
SHORT
;	
	repeat SPRHEIGHT-2
;	
	ex de,hl
	pop hl

	ld c,a
	ld b,0
	add hl,bc	
	ex de,hl

;
	repeat SPRWIDTH
	ldi
	rend

	rend

STORE_SP ld sp,000
;
	ei
	ret

DISPLAY_MOVING_SPRITE1
MOVE_SPR_H 	ld hl,TAB_MOVES_T+&200+&ff ; 
STOP_MOVH	inc l
			ld (MOVE_SPR_H+1),hl
			ld a,(hl)
			exx
			add a,a
			add a,a
			ld h,a
			ld l,0
						
SPRITE1		ld bc,SPRITE_HL
			add hl,bc
			ld (SPRITE1_FINAL+1),hl
			exx

			dec h

			ld a,(hl)
			add a,a
			ld e,a
			ld d,0
;			
			dec h                 ; table X
			ld a,(hl)
;
			ld bc,0
			ld hl,TABLINE_96
			add hl,de
			add hl,bc
;
SPRITE1_FINAL		ld bc,SPRITE_HL
		call DISPLAY_SPRITE

		ret

DISPLAY_MOVING_SPRITE2

MOVE_SPR_L 	ld hl,TAB_MOVES_B+&200 ; +&ff+1 ; table Y
STOP_MOVL			inc l
			ld (MOVE_SPR_L+1),hl
			ld a,(hl)
;
			exx
			add a,a
			add a,a
			ld h,a
			ld l,0
						
SPRITE2		ld bc,SPRITE_LL
			add hl,bc
			ld (SPRITE2_FINAL+1),hl
			exx
	     	dec h
			ld a,(hl)
			add a,a
			ld e,a
			ld d,0
;			
			dec h                 ; table X
			ld a,(hl) 

			ld bc,72+16+16+4+2+6+2
			ld hl,TABLINE_96
			add hl,de
			add hl,bc
;
SPRITE2_FINAL			ld bc,SPRITE_LL

		call DISPLAY_SPRITE
		ret

			align 256
;	
TAB_SCENARIO   
;			
           defb 128 
           defw STATIC_SPRITES
TAB_SCENARIO_LOOP 
;			
			defb &98
			defw PART3
;			
			defb 256-&98-1
			defw PART4
;			
			defb 1
			defw PART5
;	
			defb &98+5 ; +5-2
			defw PART1
;
			defb 256-&98-5-1
			defw PART2
;
            defb 1
			defw PART6

	;		defb &98
	;		defw PART3
;			
;			defb 256-&98-1
;			defw PART4
;			
;			defb 1
;			defw PART5
;	
;			defb &98+5 ; +5-2
;			defw PART1
;
;			defb 256-&98-5-1
;			defw PART2
;
;           defb 1
;			defw PART6

            defb &98/2+20-10
			defw PART3

           defb 128 
           defw STATIC_SPRITES2
			defb 0

TAB_SCENARIO_SPR 
 ;
              defb 3
              defw DISPLAY_HEART4
               defb 3
              defw DISPLAY_HEART5
			   defb 3
              defw DISPLAY_HEART6
			   defb 3
              defw DISPLAY_HEART5
			   defb 3
              defw DISPLAY_HEART4
			   defb 3
              defw DISPLAY_HEART3
			   defb 3
              defw DISPLAY_HEART2
			   defb 3
              defw DISPLAY_HEART1
			   defb 3
              defw DISPLAY_HEART2
			   defb 3
              defw DISPLAY_HEART3
;			  
			  defb 0


TAB_SCENARIO_TRANSITION1   
			
			defb 1
			defw DISPLAY_BACKGROUND1
			defb 1
			defw DISPLAY_BACKGROUND2			
			defb 1
			defw DISPLAY_BACKGROUND3
			defb 1
			defw DISPLAY_BACKGROUND4
			defb 1
			defw DISPLAY_BACKGROUND5
            defb 1
			defw DISPLAY_BACKGROUND6
			defb 1
			defw DISPLAY_B_TRANSITION1
;			

			defb 0			
PART1 	

MODE_TOP_1 			ld a,&8c  ; 			
					ld (MODE_TOP+1),a	
					ld (POK_M2+1),a	

MODE_BOTTOM_1 		ld a,&8e
					ld (MODE_BOTTOM+1),a	
					ld (POK_M1+1),a
			;		ld (POK_M2+1),a	


		ld a,&69 ; out (c),l
		ld (PATCH1+1),a
		ld a,&59 ; out (c),e
		ld (PATCH2+1),a	
;
SPR1_1		LD hl,SPRITE_HL
SPR2_1		LD de,SPRITE_LL

				ld (SPRITE1+1),de
				ld (SPRITE2+1),hl
;
				ld c,&49
				ld a,&49

switch_raster2_1 ld de,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER1A+1),de
switch_pens1_1  ld de,&010f
				ld (POK_RASTER1+1),de	

				ld a,&1
				ld (POK_RASTER2+2),a			
;????
switch_raster1_1  ld hl,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER0A+1),hl


; ?????				
switch_pens2_1  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&49   ; out c,(l)   
				ld a,&49
POKE2_1
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
;
				ret

PART2 	

MODE_TOP_2 			ld a,&8c  ; 
					ld (POK_M1+1),a
					ld (MODE_TOP+1),a	

MODE_BOTTOM_2		ld a,&8e
					ld (MODE_BOTTOM+1),a	
					ld (POK_M2+1),a	

		ld a,&59
		ld (PATCH1+1),a
		ld a,&69 
		ld (PATCH2+1),a	


;
SPR1_2		LD hl,SPRITE_HL
SPR2_2		LD de,SPRITE_LL

				ld (SPRITE1+1),de
				ld (SPRITE2+1),hl
;
				ld c,&49
				ld a,&49

switch_raster2_2 ld de,RASTER_BOTTOM_TOP ; &5D58
				ld (POK_RASTER1A+1),de
switch_pens1_2  ld de,&010f
				ld (POK_RASTER1+1),de		

				ld a,&f
				ld (POK_RASTER2+2),a			
;????
switch_raster1_2  ld hl,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER0A+1),hl
; ?????				
switch_pens2_2  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&69   ; out c,(l)   
				ld a,&49
POKE2_2
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
;
				ret

STATIC_SPRITES2
    xor a
	ld (STOP_MOVH),a
	ld (STOP_MOVL),a
	jr PART3


STATIC_SPRITES
    ld hl,TAB_MOVES_T+&200+&ff
	ld (MOVE_SPR_H+1),hl
	ld hl,TAB_MOVES_B+&200 
    ld (MOVE_SPR_L+1),hl
PART3

MODE_TOP_3 			ld a,&8e  ; 			
					ld (MODE_TOP+1),a	
					ld (POK_M2+1),a	

MODE_BOTTOM_3 		ld a,&8c
					ld (MODE_BOTTOM+1),a	
					ld (POK_M1+1),a

;			

      	ld a,&69 ; out (c),l
		ld (PATCH1+1),a
		ld a,&59 ; out (c),e
		ld (PATCH2+1),a	
SPR1_3		LD hl,SPRITE_HL
SPR2_3		LD de,SPRITE_LL

				ld (SPRITE1+1),hl
				ld (SPRITE2+1),de
;
				ld c,&49
				ld a,&49

switch_raster2_3 ld de,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER1A+1),de
switch_pens1_3  ld de,&0f01
				ld (POK_RASTER1+1),de	

				ld a,&f
				ld (POK_RASTER2+2),a				
;????
switch_raster1_3  ld hl,RASTER_TOP_BOTTOM  ;&585D
				ld (POK_RASTER0A+1),hl


; ?????				
switch_pens2_3  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&49   
				ld a,&49
POKE2_3
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
;
				ret

PART4

MODE_TOP_4 			ld a,&8e  ; 			
					ld (MODE_TOP+1),a	
					ld (POK_M1+1),a	

MODE_BOTTOM_4 		ld a,&8c
					ld (MODE_BOTTOM+1),a	
					ld (POK_M2+1),a
			;		ld (POK_M2+1),a	
;			
SPR1_4		LD hl,SPRITE_HL
SPR2_4		LD de,SPRITE_LL

				ld (SPRITE1+1),hl
				ld (SPRITE2+1),de
;
				ld c,&49
				ld a,&49

switch_raster2_4 ld de,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER1A+1),de
switch_pens1_4  ld de,&010f
				ld (POK_RASTER1+1),de


				ld a,&f
				ld (POK_RASTER2+2),a	

switch_raster1_4  ld hl,RASTER_TOP_BOTTOM  ;&585D
				ld (POK_RASTER0A+1),hl
			
switch_pens2_4  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&69   
				ld a,&49
POKE2_4
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
				ret

PART5
 ;kpoint
MODE_TOP_5 			ld a,&8e  ; 			
					ld (MODE_TOP+1),a	
					ld (POK_M1+1),a	

MODE_BOTTOM_5 		ld a,&8c
					ld (MODE_BOTTOM+1),a	
					ld (POK_M2+1),a
			;		ld (POK_M2+1),a	
;			
SPR1_5		LD hl,SPRITE_LL ;  SPRITEHL
SPR2_5		LD de,SPRITE_HL

				ld (SPRITE1+1),hl
				ld (SPRITE2+1),de
;
				ld c,&49
				ld a,&49

switch_raster2_5 ld de,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER1A+1),de
switch_pens1_5  ld de,&010f
				ld (POK_RASTER1+1),de


				ld a,&f
				ld (POK_RASTER2+2),a	

switch_raster1_5  ld hl,RASTER_TOP_BOTTOM  ;&585D
				ld (POK_RASTER0A+1),hl
			
switch_pens2_5  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&69   
				ld a,&49
POKE2_5
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
				ret



PART6

MODE_TOP_6			ld a,&8e  ; 			
					ld (MODE_TOP+1),a	
					ld (POK_M2+1),a	

MODE_BOTTOM_6 		ld a,&8c
					ld (MODE_BOTTOM+1),a	
					ld (POK_M1+1),a
			;		ld (POK_M2+1),a	
;			

	ld a,&69 ; out (c),l
		ld (PATCH1+1),a
		ld a,&59 ; out (c),e
		ld (PATCH2+1),a	
SPR1_6		LD hl,SPRITE_HL
SPR2_6		LD de,SPRITE_LL

				ld (SPRITE1+1),hl
				ld (SPRITE2+1),de
;
				ld c,&49
				ld a,&49

switch_raster2_6 ld de,RASTER_TOP_BOTTOM ; &585D
				ld (POK_RASTER1A+1),de
switch_pens1_6  ld de,&0f01
				ld (POK_RASTER1+1),de	

				ld a,&f
				ld (POK_RASTER2+2),a	

switch_raster1_6  ld hl,RASTER_TOP_BOTTOM  ;&585D
				ld (POK_RASTER0A+1),hl

		
switch_pens2_6  ld hl,&0f01	
				ld (POK_RASTER0+1),hl
;
				ld c,&49   
				ld a,&49
POKE2_6
				ld hl,POK_OUT_L+1
				ld (hl),c
				ld de,POK_OUT_R+1
				ld (de),a
;
				ret

COLOR
	ld bc,&7f00
BOUCOLOR
	out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c 
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l  
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)  
	out (c),a
;
	inc l
	inc c
    out (c),c
	ld a,(hl)  
	out (c),a
	ret	
;
HBL_ZONE_02

		di
;
; IMPORTANT *****************************
; start at HCC = &1C

;	NOP

	exx

POK_M1X		ld bc,&7f8e
POK_RASTER1X	ld hl,&010f
POK_RASTER1AX ld de,&5454 ;RASTER_BOTTOM_TOP ;&5D58
			out (c),h
			out (c),d
			out (c),l
;						
POK_M2X		ld hl,&8d8c
		;	ld a,h
;			
PATCH1X			out (c),e  ; 
		exx
PATCH_LOGO1	ld hl,&1932
; was 	ld de,&1F07
    ld de,&1f08
	ld bc,&bc03
	out (c),c
	inc b
;	dec c    ; &bd02
	defs 27-1,0

	out (c),e   ; R3=&08
		ld c,2 ; &8c
	exx
PATCH2X 	out (c),l   ; mode 0
  ;   defs 4,0
	exx
;	defs 5,0


   ld a,HEIGHT_HBL_FLASH
HBL_FLASH
;	repeat 48
;
; was out (c),c ; R3= 2	
;
	exx ;
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
;
	defs 10-4,0
    dec a
	jr nz,HBL_FLASH
;	
;	rend	
; *****************************************	
; last line 
	out (c),c ; R3= 2
;
	exx 
	out (c),h ; mode 
	exx
	dec b
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &12
;
	defs 8-2,0
	ld e,&8e-2
	out (c),d   ; R2 = &22
	exx 
POK_OUT_RX	out (c),c ; mode 
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	exx
POK_OUT_LX 	out (c),l    ; dernier mode
;	defs 4,0
	
	exx

; breakpoint
	out (c),e    ; R3 = &A

			exx
POK_RASTER2X 
			ld hl,&0f54
			out (c),h
			out (c),l
			ld h,&F		
			out (c),h
			out (c),l	
		;	exx 

	ret

DISPLAY_H_LOGO
; H
	ld a,14
    ld (WIDTH_SPRITE+1),a
	ld a,20-14+2+2
	ld (POSX_SPRITE+1),a

; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,44-1-3
	ld bc,SPRITE_H_LOGO
	ld hl,TABLINE_80+16-8
    call DISPLAY_SPRITE_80BYTES
	ret
;


DISPLAY_ORNY
; hORNY
	ld a,25
    ld (WIDTH_SPRITE+1),a
	ld a,20+1
	ld (POSX_SPRITE+1),a

; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,44 
	ld bc,ORNY
	ld hl,TABLINE_80
    call DISPLAY_SPRITE_80BYTES
	ret


DISPLAY_B_LOGO   
; bYTES
	ld a,15-1
    ld (WIDTH_SPRITE+1),a
	ld a,0
	ld (POSX_SPRITE+1),a
; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,48-4-4
	ld bc,SPRITE_B_LOGO
	ld hl,TABLINE_80+60+50-20-2-2+4+2

    call DISPLAY_SPRITE_80BYTES
	ret
DISPLAY_YTES   
; bYTES
	ld a,23
    ld (WIDTH_SPRITE+1),a
	ld a,10+4-2
	ld (POSX_SPRITE+1),a
; a = HEIGHT	
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,48-6-1
	ld bc,YTES
	ld hl,TABLINE_80+60+50-20-2-2+4-2

    call DISPLAY_SPRITE_80BYTES
;
; MODE 0 patch for the first line of S
; which is supposed to be in MODE 1
;
       ld a,64  
PATCH ld hl,&E1AF
       ld (hl),a
	   inc l
	   ld a,192
	   ld (hl),a
;	   inc l
;	   ld (hl),a
	ret


DISPLAY_L_LOGO


	ld a,16
    ld (WIDTH_SPRITE+1),a
	ld a,35+2
	ld (POSX_SPRITE+1),a

; a = HEIGHT	 
; bc = SPRITE 
; hl = ADDRESSES TABLE
    ld a,45
	ld bc,SPRITE_L_LOGO
	ld hl,TABLINE_80+300-2
    call DISPLAY_SPRITE_80BYTES
	ret


HBL_ZONE_LOGO
		di
; IMPORTANT *****************************
; start at HCC = &1C
	    exx
		ld bc,&7f8e					
		ld hl,&8d8c
;
	exx
	ld hl,&1800+R2_LOGO
    ld de,&1f08
	ld bc,&bc03
	out (c),c
	inc b
	defs 27-1,0
	out (c),e   ; R3=&08
	exx
    out (c),l   ; mode 0
	exx
	ld c,2 ; &8c
;
  nop
  nop
    ld a,HEIGHT_HBL_HORNY
HBL_HORNY1
;	repeat 20
	exx 
	out (c),l ; MODE 0
	exx
	out (c),c ; R3= 2
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F
	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
	defs 10-4,0
    dec a
	jr nz,HBL_HORNY1
		exx 
	out (c),l ; MODE 0
	exx
	out (c),c ; R3= 2
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
;	dec h
	out (c),h   ; R2 = &1F
	defs 9+1,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
	defs 10-3,0
    ld a,HEIGHT_HBL_HORNY2
	dec h
;	
HBL_HORNY2
;	repeat 20
	exx 
	out (c),l ; MODE 0
	exx
	out (c),c ; R3= 2
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	
	out (c),h   ; R2 = &1F
	defs 9+1,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
	defs 10-4,0
    dec a
	jr nz,HBL_HORNY2
;	rend	
; *****************************************	
	exx 
	out (c),l ; MODE 0
	exx
	out (c),c ; R3= 2
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	
	out (c),h   ; R2 = &1F
	defs 9+1,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c 
    defs 10-3,0
    ld a,HEIGHT_HBL_HORNY3+1
	dec h

HBL_HORNY3
;	repeat 20
	exx 
	out (c),l ; MODE 0
	exx
	out (c),c ; R3= 2
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	
	out (c),h   ; R2 = &1F
	defs 9+1,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
	defs 10-4,0
    dec a
	jr nz,HBL_HORNY3
	exx 
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),l ; mode 0 for the transition line
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c

	ld h,&14+1
	exx
 
; 64NOPS
    ld bc,&7f01
	out (c),c
	ld c,COLOR1_BYTES_LOGO
	out (c),c
	defs 64-13-32-4,0
; end of the line
    ld c,&8d
	out (c),c
	defs 32,0
	exx
	defs 4-2,0
    ld a,HEIGHT_HBL_BYTES
HBL_BYTES

	exx 
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
;
	defs 10-4,0
    dec a
	jr nz,HBL_BYTES	
;	

	exx 
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
;
    defs 10-2,0 
	ld h,&10

    ld a,HEIGHT_HBL_BYTES2
HBL_BYTES2

	exx 
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
;
	defs 10-4,0
    dec a
	jr nz,HBL_BYTES2	

	exx 
	out (c),l ; MODE 0
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &1F

	defs 10,0
	exx 
	out (c),c ; mode 2
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	out (c),e    ; R3 = &7
	dec c        
;
     exx 
	out (c),l ; MODE 0
	exx
;	
	dec b
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &12
;
	defs 8-2,0
	ld e,&8e
	out (c),d   ; R2 = &22
	exx 
; out (c),c ; mode 
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	exx
  out (c),l    ; dernier mode
;	defs 4,0
	
	exx

	out (c),e    ; R3 = &A

			exx
	ret


HBL_ZONE_012
		di
;
; IMPORTANT *****************************
; start at HCC = &1C

;	NOP

	exx
; preload the 2 MODEs
; H=left mode
; L=right mode  
;

POK_M1		ld bc,&7f8e
POK_RASTER1	ld hl,&010f
POK_RASTER1A ld de,RASTER_BOTTOM_TOP ;&5D58
			out (c),h
			out (c),d
			out (c),l
;						
POK_M2		ld hl,&8d8c
		;	ld a,h
;			
PATCH1			out (c),e
		exx
	ld hl,&1132
; was 	ld de,&1F07
   ld de,&1f08
	ld bc,&bc03
	out (c),c
	inc b
;	dec c    ; &bd02
	defs 27-1,0

	out (c),e   ; 
	ld c,2 ; &8c
	exx
PATCH2	out (c),l
	exx
;	defs 5,0

  ld a,HEIGHT_HBL_MAIN
   nop
   nop
HBL_LOOP_012
;	repeat 48+4-1+10-3-12
;
; was out (c),c ; R3= 2	
;
	exx 
	out (c),h ; mode 
	exx
;
	out (c),c ; R3= 2
;
	dec b
	ld c,2
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &11
;
	defs 8-2,0
	out (c),d   ; R2 = &1F
	exx 
	out (c),c ; mode 
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	exx
	out (c),l
	exx
	out (c),e    ; R3 = &7
	dec c        
;
	;defs 4,0	
    dec a
	jr nz,HBL_LOOP_012
	nop
	;rend	
; last line 
    exx 
	out (c),h ; mode 
	exx
	out (c),c ; R3= 2
;
	
	dec b
	out (c),c ; R2 selected
	inc b
	out (c),h   ; R2 = &12
;
	defs 8-2,0
	ld e,&8e-2
	out (c),d   ; R2 = &22
	exx 
POK_OUT_R	out (c),c ; mode 
	exx
	out (c),l   ; R2 = &32 = 50
	inc c
	dec b
	out (c),c   ; R3 selected
	inc b
	exx
POK_OUT_L 	out (c),l    ; dernier mode
;	defs 4,0
	
	exx

	out (c),e    ; R3 = &A
;

			exx
POK_RASTER2 ld hl,&0f00+BORDER_BOTTOM
			out (c),h
			out (c),l
			ld h,&F		
			out (c),h
			out (c),l	
			exx 
	        ret
; 			
	align 256
; 	
; PEN 7 is set to BORDER_TOP to hide the post-HBL parasite
; from MODE 1 to MODE 0 	
TCOL_MAIN defb INK0,BORDER_BOTTOM
	defb 91,BORDER_TOP
	defb &4d,BORDER_TOP,84
	defb BORDER_TOP
	defb &4f,&45,&5d,&4b
	defb 67 ; &59 ; 91 
	defb &5f,&55,BORDER_TOP
;	
	defb BORDER_TOP
;	
; PEN 7 is set to BLACK to hide the post-HBL parasite
; from MODE 2 to MODE 0 	   
TCOL_FLASH1 defb 75,84,79,77
		defb &4d,84,84
		defb 84
		defb &4f,&45,&5d
		defb 75,67,&5f,&55,84
		defb 84

TCOL_FLASH2 defb 84,84,75,91
	    defb &4d,84,84
		defb 84
		defb &4f,&45,&5d
		defb 75,67,&5f,&55,84
		defb 84
;		
TCOL_LOGO 
    defb &54,88 ; &55
	defb &5f,&5d ; &45
	defb &47,&5e,69,&46,&4f,&40,&43,&4b,&4a,&44,&5c,&4e
	defb &54
     ;   DB	#54,#5C,#43,#4B,#47,#5E,#4c,#5f,#44,#40,#4e,#4f,#5d,#4a,#5B,#46,#54




;defb 84,&4B,&n43,&5c
          ; defb &47,&5e,&44,&5f,&4e,&4c,&4f,&5d,&4a,&40,&5b,&54

POSXH    equ 30-5
POSXL    equ 50+4
TABLE_FLASHING_MOVES
  
            defb MODE2,1 
            defw SPRITE_HL,SPRITE_LR
			defb POSXH,POSXL
;
            defb MODE0,1  
            defw SPRITE_HL,SPRITE_LR
			defb POSXH,POSXL            
;
   repeat 20
            defb MODE2,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH,POSXL
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH,POSXL 

		rend	
; 
; --
            defb MODE2,1  
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-1,POSXL+1
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-1,POSXL+1        
;
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-2,POSXL+2
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-2,POSXL+2          
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-3,POSXL+3
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-3,POSXL+3       
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-4,POSXL+4
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-4,POSXL+4     
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-5,POSXL+5
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-5,POSXL+5        			
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-6,POSXL+6
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-6,POSXL+6        
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-7,POSXL+7
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-7,POSXL+7       
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-8,POSXL+8
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-8,POSXL+8      
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-9,POSXL+9
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-9,POSXL+9     
;
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-10,POSXL+10
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-10,POSXL+10     
;
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-11,POSXL+11
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-11,POSXL+11   
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-12,POSXL+12
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-12,POSXL+12  
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-13,POSXL+13
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-13,POSXL+13  
;
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-14,POSXL+14
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-14,POSXL+14  
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-15,POSXL+15
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-15,POSXL+15  
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-16,POSXL+16
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-16,POSXL+16  
; --
            defb MODE2,1   
            defw SPRITE_HR,SPRITE_LL
			defb POSXH-17,POSXL+17
;
            defb MODE0,1   
            defw SPRITE_HL,SPRITE_LR
			defb POSXH-17,POSXL+17 ;
;
		    defb MODE0,10   
            defw SPRITE_VIDE,SPRITE_VIDE
			defb POSXH-17,POSXL+17 ;
 

            defb 0		
;						
COEUR4  incbin "files/COEUR4F.WIN"
COEUR3  incbin "files/COEUR3F.WIN"
COEUR2  incbin "files/COEUR2F.WIN"
COEUR1  incbin "files/COEUR1F.WIN"
;
CRTC_TYPE defb SELECTED_CRTC		   
;
  read "rain.asm"
	list 
	nop

EXIT_PART

	DS_SECURE_WAIT_VSYNC()
	ld hl,ini_crtc_load
	call put_crtc

	ld bc, 0x7f54
	xor a
.black_loop
		out (c), a
		out (c), c
		inc a
		cp 18
	jr nz, .black_loop
;
	
	call ds_stop_sound


if LOAD_THE_LOADER
	NEXT_STEP_ADDRESS equ 0x100
else
	NEXT_STEP_ADDRESS equ 0x180
endif

    di
    ld hl, start_loader
	ld de, NEXT_STEP_ADDRESS
    ld bc, stop_loader - start_loader
	ldir
    ld sp, NEXT_STEP_ADDRESS
    jp NEXT_STEP_ADDRESS
start_loader
	if LOAD_THE_LOADER
		rorg 0x100
		include "../linking/src/load_outer_space_loader.asm"
		rend
	else
		incbin "../polar_dots/POLAR.LOA"
	endif
stop_loader
;

	DS_PRODUCE_STOP_SOUND_ROUTINE()

  align 256
END_CODE    
	assert $<0xBC000
Show Source
	run &1000

/*
	; a basm bug forbids to write that
	bank &C6
 	org &4000
	incbin "C6.4000"
*/

	bank &c6
	org &4000
	incbin "C6.4000"

	bank &c0
	org &1000
	BREAKPOINT
	incbin "C0.1000"

Full Source

Show Source



	include "../linking/src/demosystem/linker_common.asm"
	include once "../linking/src/demosystem/common.asm"

	; the backward cruncher is almost always the best choice
	; as it virtually needs less memory
SELECTED_CRUNCHER=CRUNCHER_ZX0_BACKWARD


	org 0x200
	run $

	
	di
	ld hl, 0xc9fb
	ld (0x38), hl
	ld sp, $

	ld bc, 0x7fc6 : out (c), c
	UNCRUNCH(C6_4000, 0x4000)
	assert C6_4000.uncrunched_length < 0x4000, "there is an issue we smash crunched data here"

	ld bc, 0x7fc4 : out (c), c
	UNCRUNCH(C4_4000, 0x4000)
	assert C4_4000.uncrunched_length <= 0x4000, "there is an issue we smash crunched data here"

	ld bc, 0x7fc0 : out (c), c
	UNCRUNCH(C0_8000, 0x8000)

	UNCRUNCH(C0_800, 0x800)


	; launch the intro
	ld sp, 0xc000
	ei

	DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(0x1e, 0x1e-2)
	halt : DS_CRTC_HORIZONTAL_TRANSITION_ONLY(0x2e,  &30+2) ; Seems to be OK
	jp 0x8000

	INSTALL_UNCRUNCHER()


	assert $<0x800
	
	LOAD_N_CRUNCH(C6_4000, "C6.4000")
    LOAD_N_CRUNCH(C4_4000, "C4.4000")
	assert $<0x4000
	LOAD_N_CRUNCH(C0_8000, "C0.8000")
    LOAD_N_CRUNCH(C0_800, "C0.800")
	save "INTRO.LNK"

Full Source

Show Source
include once "../linking/src/demosystem/public.asm"


	org 0x200
	run $

	ld hl, 0xc9fb : ld (0x38), hl

	jp show_image
loader_start
	rorg 0x50
load_next
	include "../linking/src/load_intro.asm"
	;include "../linking/src/load_make_it_easy.asm"
	rend
loader_stop

show_image
	include "../linking/src/demosystem/linker_common.asm"
	SELECTED_CRUNCHER=CRUNCHER_EXOMIZER



	; CRTC input state
	; R4=38
	; R7=0
	; R1=0

	; DO the CRTC transition
	; DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC(0, 0x1e, 0x32, 0x2e)
	ei
	DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(0x1c, 0x1e) ; this is ok

; no need to do a R2 trnasition !
;	halt : DS_CRTC_HORIZONTAL_TRANSITION_ONLY(0x32,  &2e) ; Seems to be OK

	ld bc, 0xbc01 : out (c), c 
	ld bc, 0xbd00 + 96/2 : out (c), c

;	ld bc, 0xbc02 : out (c), c 
;	ld bc, 0xbd00 + 0x32 : out (c), c

;	ld bc, 0xbc07 : out (c), c 
;	ld bc, 0xbd00 + 0x1e : out (c), c


	ld bc, 0xbc06 : out (c), c 
	ld bc, 0xbd00 + 25 : out (c), c


	ld bc, 0xbc03 : out (c), c 
	ld bc, 0xbd00 + 0x8e : out (c), c


	ld hl, palette_fadein.data
	call palette_fadein.set_palette

	ld bc, 0x7f10 : out (c), c
	ld bc, 0x7f54 : out (c), c

    UNCRUNCH C000, 0xc000

	ld bc, 0xbc00 + 12
	ld hl, 0x3000
	out (c), c : inc b : out (c), h : dec b : inc c
	out (c), c : inc b : out (c), l

palette_fadein

.loop
	DS_SECURE_WAIT_VSYNC()

	; select the right palette
	ld hl, .data
.palette_address equ $-2
	call .set_palette

	; change the palette every x frames
	ld a, 4
.wait equ $-1
	inc a : and %11
	ld (.wait), a
	jp nz, .loop

	ld hl, (.palette_address)
	ld de, 4
	add hl, de
	ld (.palette_address), hl

	ld a, (hl) : or a
	jp nz, .loop

	di
		ld sp, 0xc000
	ei
	ld hl, loader_start
	ld de, load_next
	ld bc, loader_stop-loader_start
    ldir

	jp load_next
	
.set_palette
	ld b, 0x7f : xor a
.ga_loop
	ld c, (hl)
	out (c), a
	out (c), c

	inc hl
	inc a
	cp 4 : jp nz, .ga_loop
	ret

.data
	incbin "loading_fadeout.ga", 4*16, 4
	incbin "loading_fadeout.ga", 3*16, 4
	incbin "loading_fadeout.ga", 2*16, 4
	incbin "loading_fadeout.ga", 1*16, 4
	incbin "loading_fadeout.ga", 0*16, 4
	db 0


	INSTALL_UNCRUNCHER()



	LOAD_N_CRUNCH C000, "loading.scr"



	SAVE "INTRO.LOA"

Full Source

Show Source
   BuffSize	equ #B42		; Size of replay buffer given by the cruncher.

    FapBuff	equ #6000       	; Address of the decrunch buffers (low order byte MUST BE 0).
    HiFapBuff equ hi(FapBuff)

FapPlay
     incbin "files/fap-play.bin"
FapData
PlayerSize equ FapData - FapPlay
    
   ;  incbin   "files/vertexzeta.fap"
      incbin "files/intro.fap"
   
;     org	FapInit
 
FapInit     incbin "files/fap-init.bin"

   assert $<=FapBuff
;   
 ;    print "FapInit ", {hex}FapInit
 ;    print "FapPlay ", {hex}FapPlay
 ;    print "FapData ", {hex}FapData
 ;    print "After FapData ", {hex}$

Full Source

Show Source
             align 256
RAINX             
             incbin "files/RAIN.DAT"
STORE_POS_RAIN defs 160,0             
RAIN_CODE    
    ;         ld sp,TABLINE_80
;
      ld (SAUVE_SP_RAIN+1),sp

       ld bc,&7fc4
       out (c),c
;


 ; breakpoint
POS_RAINX    ld hl,RAINX+79
             inc l
;             
             ld a,l
             cp 80
             jr nz,NO_LOOP_POSRAINX  
;
            ld hl,RAINX
NO_LOOP_POSRAINX ld (POS_RAINX+1),hl               

;  read the pixel X position to read 
             ld a,(hl) 
; 
             ld h,STORE_POS_RAIN/256 
             ld l,a
             ld c,a
; read the relative Y position 
             ld e,(hl)   
             ld d,0
;
NB_ITERATION_RAIN 
;               inc h
               exx
VARIO_TABLE_RANDOM   ld hl,RAINX+&100              
               ld a,(hl)
     ;          and %0001111 
  ;    inc a
               inc l
               ld (VARIO_TABLE_RANDOM+1),hl
               exx
               ld b,a
;
;              dec h
              add a,e
              ld (hl),a                                                     
;
            ld hl,TABLINE_80
            add hl,de
            add hl,de
;            
           ld sp,hl 


       ;        ld a,c
LOOP_DISPLAY_RAIN
          pop de  
;
         res 7,d
         ld l,c
         ld h,0
         add hl,de
 ;        
        ld a,(hl)
        set 7,h
        ld (hl),a

        djnz LOOP_DISPLAY_RAIN

 ; breakpoint


  ld bc,&7fc0
  out (c),c

SAUVE_SP_RAIN ld sp,0000
     ret

; DE = address to display

             bit 0,a
;              
             jr z,PAIR 
IMPAIR





PAIR

Full Source

Show Source

ifndef SELECTED_CRTC
	fail "SELECTED_CRTC not defined"
endif

TESTBRK = 0 ; 1

STATIC equ 0

MODE2 equ &8e
;
INK0 equ 84 ; 64 ; 84 ; 64
INK1 equ &5f ; 77 ; &55 


B1 equ 68  ; 64   
B2 equ 85 ; 87 
; 
R5 equ 0
PAGE_SCROLL = &30 ; &C000
PAGE_LOGO = &10
BKMUSIC = &C6
; remplissage de vide
	; add ix,sp ; 4 nops 
	; add ix,ix ; 4 nops
	; dec (ix+0) ; 6 nops 
;    
;NBMOVESMAX equ 27*4
;

Full Source

Show Source

	org 0x260
	run $
	breakpoint


start
	incbin PT1_FNAME
	incbin PT2_FNAME
length equ $-start


	save EXEC, start, length, DSK, DSK
	save EXEC, start, length, AMSDOS

Full Source

Show Source
;;
;; Makeiteasy code depends on the CRTC used.
;; Due to its coplexity, we expect to load it in two parts:
;; - part 1 : the code that decrunches the rest of the demo and contains CRTC agnostic stuff
;; - part 2 : the CRTC specific code that is uncrunched by part 1
;;
;; This is part 1 here
;; of course the very same cruncher needs to be used. So do not change it !!


	org 0x260	
	run $

	assert $==0x260, "you need to update dsk_multimoderupture8_join.asm accordingly"

	include "../linking/src/demosystem/linker_common.asm"
	include once "../linking/src/demosystem/public.asm"

	SELECTED_CRUNCHER equ CRUNCHER_ZX0_BACKWARD  		; 20251215: 32352 bytes 
	
start

	ld hl, 0xc9fb : ld (0x38), hl
	ld sp, $


	di


		ld bc, 0x7fc4 : out (c), c
			UNCRUNCH(c4_4000, &4000)  ; 
	;		ld bc, 0x7fc0 : out (c), c
			assert c4_4000.uncrunched_length + 0x4000 <= $8000
		ld bc, 0x7fc5 : out (c), c
			UNCRUNCH(c5_4000, &4000)  ; 
			ld bc, 0x7fc0 : out (c), c
			assert c5_4000.uncrunched_length + 0x4000 <= $8000

		c6_move = c4_4000

		MOVE_CRUNCHED_DATA(c6_4b42, c6_move)
		assert c6_move + c6_4b42.length < &4000
		ld bc, 0x7fc6 : out (c), c
			INDIRECT_UNCRUNCH(c6_move, c6_4b42, &4b42)  ; XXX need to sync with music addresses !!!
			ld bc, 0x7fc0 : out (c), c
			assert c6_4b42.uncrunched_length + 0x4000 <= $8000 ; maybe these tests are not necesary in backward


    ;UNCRUNCH(main_800, 0x800)
	; Sadly we cannot use it directly because we do not have the information
	; get the length in bc
	assert SELECTED_CRUNCHER = CRUNCHER_ZX0_BACKWARD, "This code only works with ZX0 BACKWARD cruncher"
	; TODO create a macro for that when everything will work
	ld hl, main_800 + 0
	ld c, (hl) : inc hl
	ld b, (hl)
	dec bc ; bc = uncrunched length = -1
	ld hl, 0x800 ; HL = address of uncrunched data
	add hl, bc  
	ex de, hl     ; DE = last byte of uncrunched data

	ld hl, main_800 + 2
	ld c, (hl) : inc hl
	ld b, (hl) : inc hl
	dec bc ; bx = crunched data length
	add hl, bc
	; hl = last byte of crunched data
	call uncrunch



	UNCRUNCH(main_c000, &c000)

;
; copier demosysteme avant de décompresser bank &C7
; de &C260 à &C3FF sur 8 lignes = 
; de &C660 à &C7FF sur 8 lignes =
; ou Bank MUSIC
; libre de &7500 à &7FFF = 2816 octets

START_DS 	equ &6000
SAVE_DEMOSYSTEM
; Demosystem is max &2000 bytes 
;
; first &600 bytes of the demosystem are copied in the BANK C6 (after the MUSIC)
; 
		ld bc,&7fc7
		out (c),c
;
		exx 		
		ld hl,START_DS
		ld bc,&600
		ld de,&a000
		ldir
		exx
;		
		ld bc,&7fc6
		out (c),c
		ld de,&7500
		ld hl,&a000
		ld bc,&600
		ldir
;		
; then 16*&1A0 bytes are copied in the &C000 page 
;
		ld bc,&7fc7
		out (c),c
;

        ld (SAVE_SP+1),sp
;
	    ld sp,TABLE_SAVE_DS
;			
		ld b,16
SAVE_1A0_BYTES
;
		exx
		pop DE
		ld bc,&1a0
		ldir
		exx

		djnz SAVE_1A0_BYTES
;
;
;

SAVE_SP ld sp,0
;
; decrunches C7 datas in &8000  
; and copies it in &C7
;
		ld bc, 0x7fc0 : out (c), c
		;	ld bc, 0x7fc7 : out (c), c
			UNCRUNCH(c7_4000, &8000)  ; 
		;	ld bc, 0x7fc0 : out (c), c
		ld bc, 0x7fc7 : out (c), c
		ld hl, &8000 : ld de, &4000 : ld bc, &3fff : ldir
		ld bc, 0x7fc0 : out (c), c
			
	;		assert c7_4000.uncrunched_length + 0x4000 <= $8000


		; Do the crtc transition

		
		main_4000_move = 0x8000
		MOVE_CRUNCHED_DATA(main_4000, main_4000_move)
		assert main_4000_move + main_4000.length < 0xC000
		INDIRECT_UNCRUNCH(main_4000_move, main_4000, 0x4000)
;		
; clear &8000 page
		ld de,&8001
		ld bc,&3fff
		ld hl,&8000
		ld (hl),l
		ldir

		ei

		DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(0x1e, 0x00)


	jp 0x800
	align 2
TABLE_SAVE_DS
	defw &C260,&CA60,&D260,&DA60,&E260,&EA60,&F260,&FA60
	defw &C660,&CE60,&D660,&DE60,&E660,&EE60,&F660,&FE60

	INSTALL_UNCRUNCHER()


	assert $ < 0x800
	LOAD_N_CRUNCH(c4_4000, "C4.4000")
	LOAD_N_CRUNCH(c5_4000, "C5.4000")
	LOAD_N_CRUNCH(c6_4b42, "C6.4b42")
;	assert $< 0x4000
	LOAD_N_CRUNCH(c7_4000, "C7.4000")
	
	assert $ <0xc000

;
;
StartMain4000
	LOAD_N_CRUNCH( main_4000, MAIN_4000_FNAME) ; we assume it is compatible to every CRTC
	LOAD_N_CRUNCH(main_c000, "MAIN.C000")
EndMain4000
;

	;; the rest of the file is loaded in a second moment.
	;; it is encoded as follows:
	;; - dw file length_uncrunched
	;; - dw file length_crunched
	;; - db file crunched data
	main_800 
	main_800_content = load(PT2_FNAME)
	main_800_uncrunched_length = list_get(main_800_content, 2) + (list_get(main_800_content, 3) << 8)
	assert main_800_uncrunched_length + 0x1000 < $

	assert $< 0x8200
length equ $-start

	;save EXEC, start, length, DSK, DSK
	;save EXEC, start, length, AMSDOS

Full Source

Show Source
;; this is part 2 here

;; of course the very same cruncher needs to be used. So do not change it !!
;; there is no need to use a org directive here because there is no code or real label manipulated

	include "../linking/src/demosystem/linker_common.asm"
	include once "../linking/src/demosystem/public.asm"

	SELECTED_CRUNCHER equ CRUNCHER_ZX0_BACKWARD  		; 20251215: 32352 bytes 
	
	; yep @roudoudou it helps to have a multipass assembler here
	; the tiny header required to uncrunch the data
	; TODO : store a flag for the cruncher ?
	dw main_800.uncrunched_length
	dw main_800.length
	; the crunched data
	LOAD_N_CRUNCH(main_800, MAIN_800_FNAME)

Full Source

Show Source
EFFET_HOTBOLD5
            ld a,255
            ld (EACH_VBL_I1+1),a
;            ld a,&2c ; &2c;  0 for STOP
;           ld (MANAGE_JUMP_LOGO),a
            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_INTERLACED_CURVES 
;          defs 3,0
            jr EFFET_HOTBOLD.GOTO

EFFET_HOTBOLD4
            ld a,2
            ld (EACH_LINE_I1+1),a
;            ld a,&2c ; &2c;  0 for STOP
;           ld (MANAGE_JUMP_LOGO),a
            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_INTERLACED_CURVES 
;          defs 3,0
            jr EFFET_HOTBOLD.GOTO


EFFET_HOTBOLD3
            ld a,1
            ld (EACH_LINE_I1+1),a
;            ld a,&2c ; &2c;  0 for STOP
;           ld (MANAGE_JUMP_LOGO),a
            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_INTERLACED_CURVES 
;          defs 3,0
            jr EFFET_HOTBOLD.GOTO

EFFET_HOTBOLD2
            ld a,2
            ld (EACH_LINE1+1),a
;            
            ld a,0 ; for STOP
            ld (MANAGE_JUMP_LOGO),a
;            ld a,TAB_MOVEX/256
;            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 

              
            ld (POK_CURVES_TYPE+1),hl   
             defs 3+10+13,0
         
            defs 3-2,0 

            ret
EFFET_HOTBOLD
        
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

         ;   ld a,TAB_MOVEXI/256
         ;   ld (STORE_TAB_MOVE_1+2),a
;
                ld a,1
                ld (EACH_VBL1+1),a
            ld hl,INIT_NORMAL_CURVES 
           defs 4,0
.GOTO          
               
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE2_MODE0
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
;
EFFET_OLDBITS
        
            ld a,&0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a
;
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE1
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret


EFFET_CYCLINGA
EFFET_SPACE1
                  ld a,&c4 
                ld (POK_BK_TRANS+1),a 

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
             ld hl,INIT_INTERLACED_CURVES  ; 8 NOPS for
    ;        ld hl,INIT_NORMAL_CURVES ; 8 NOPS for
   ;         ld (POK_CURVES_TYPE+1),hl
            jr EFFET_SPACE.GOTO
;
EFFET_SPACE
; black UPPER ZONE          
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   


            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_STATIC_STILL
;            ld a,0 ; &2c;  0 for STOP
;            ld (MANAGE_JUMP_LOGO),a
;            ld a,0 ; &3c
;            ld (MANAGE_CYCLE),a

            ld hl,MODE0_MODE1
            ld (MODES+1),hl 
            ld (MODES_EXIT_LOGO+1),hl    
      
        ;    defs 1+3,0

                ld a,1
                ld (EACH_LINE1+1),a    
                ld a,1
                ld (EACH_VBL1+1),a    

            ld hl,INIT_NORMAL_CURVES 
            ld (POK_CURVES_TYPE+1),hl  
;       ld (STORE_TAB_MOVE_1+2),a 


        defs 4,0               
            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            ret

EFFET_STATIC_STILL1
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a
;            ld a,0 ; &3c
;            ld (MANAGE_CYCLE),a

            ld hl,MODE0_MODE1
            ld (MODES+1),hl 
            ld (MODES_EXIT_LOGO+1),hl    
      
        ;    defs 1+3,0

                ld a,2
                ld (EACH_LINE1+1),a    
                ld a,1
                ld (EACH_VBL1+1),a    

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 

                
            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a

            ret


EFFET_CYCLING2
      
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a
            ld a,0 ; &3c
            ld (MANAGE_CYCLE),a

            ld hl,MODE0_MODE1
            ld (MODES+1),hl    
.GOTO          
            defs 1,0

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE0_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            ret


EFFET_STATIC1
; black UPPER ZONE          
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a
             ld a,1
            ld (EACH_VBL1+1),a
              ld a,3
            ld (EACH_LINE1+1),a

            ld hl,MODE0_MODE2
            ld (MODES+1),hl  
             ld (MODES_EXIT_LOGO+1),hl    
.GOTO          
         ;   defs 1+5,0

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
 
            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            ret
;
EFFET_STATIC2
; black UPPER ZONE          
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a
             ld a,2
            ld (EACH_VBL1+1),a
              ld a,2
            ld (EACH_LINE1+1),a

            ld hl,MODE0_MODE2
            ld (MODES+1),hl  
             ld (MODES_EXIT_LOGO+1),hl    
.GOTO          
         ;   defs 1+5,0

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            ret            

EFFET_30Y

            xor a ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE0_MODE1
            ld (MODES+1),hl    
.GOTO          
            defs 8,0

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&32; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_30Y_DOUBLE

            xor a ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE0_MODE0
            ld (MODES+1),hl    
.GOTO          
            defs 8,0

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE0_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_30Y_CROSS

        ;    xor a ; 0 for STOP
             ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE0_MODE2
            ld (MODES+1),hl    
.GOTO          
           defs 8-1,0

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE2_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
EFFET_30Y_CROSS2

        ;    xor a ; 0 for STOP
             ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl    
.GOTO          
           defs 8-1,0

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE0_MODE2
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_30Y_CROSS3

        ;    xor a ; 0 for STOP
        ;     ld a,0
           xor a
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl    
             ld hl,INIT_INTERLACED_CURVES
.GOTO          
      ;     defs 8-1,0
   ;     defs 13-8,0
    ;     ld hl,INIT_INTERLACED_CURVES
         ld (POK_CURVES_TYPE+1),hl

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE0_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
EFFET_30Y_CROSS4

        ;    xor a ; 0 for STOP
        ;     ld a,0
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
           ld hl,INIT_NORMAL_CURVES
 ;          ld (POK_CURVES_TYPE+1),hl
                defs 4,0
        jr EFFET_30Y_CROSS3.GOTO

        ;    ld hl,MODE2_MODE0
        ;    ld (MODES+1),hl    


EFFET_8BITS4
;

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a 
             ld hl,INIT_NORMAL_CURVES
             ld (POK_CURVES_TYPE+1),hl
             ld a,1
            ld (EACH_LINE1+1),a
            ld a,&2c
             ld (MANAGE_JUMP_LOGO),a
             defs 2,0
            JR EFFET_8BITS.GOTO

EFFET_8BITS3INT
; black UPPER ZONE          
            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 
             ld hl,INIT_INTERLACED_CURVES
             ld (POK_CURVES_TYPE+1),hl
            ld a,2
            ld (EACH_VBL_I2+1),a
            defs 5+3-5,0
                xor a
                ld (MANAGE_JUMP_LOGO),a

            JR EFFET_8BITS.GOTO

EFFET_8BITS2
; black UPPER ZONE 
     ;   breakpoint         
            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
      ;      ld hl,INIT_INTERLACED_CURVES
        ;    ld a,0
        ;    ld (EACH_LINE_I2+1),a
            ld a,&2c
             ld (MANAGE_JUMP_LOGO),a 
            defs 3+3+3+7,0
            JR EFFET_8BITS.GOTO



EFFET_8BITS_SWITCH_C7
EFFET_8BITS
        ld a,&C7
        ld (POK_BK_TRANS+1),a 
; black UPPER ZONE          
            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a 
            ld a,1
            ld (EACH_VBL1+1),a
            ld hl,MODE1_MODE0
            ld (MODES+1),hl
            ld (MODES_EXIT_LOGO+1),hl 

.GOTO          
              defs 1,0
               defs 3+8-6,0
            ld a,&20 ; DESTINATION 2
            ld (POK_OFFSET_TOP+1),a
            LD (POK_POS_OFFSET_AFTER_LOGO+2),a

            ret
;

EFFET_FINAL
         ;   ld hl,INIT_INTERLACED_CURVES
         ;   ld (POK_CURVES_TYPE+1),hl         
      ;      ld a,0
      ;      ld (MANAGE_JUMP_LOGO),a
            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_I1+2),a 

            ld a,3
            ld (EACH_LINE_I1+1),a
            ld a,1
            ld (EACH_VBL_I1+1),a

.GOTO           
            defs 1,0
           ; defs 6-4,0


            ld hl,MODE0_MODE2 
            ld (MODES+1),hl

            ld hl,MODE2_MODE0 
            ld (MODES_EXIT_LOGO+1),hl     
 
;
            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;                     
            ret 
;
EFFET_FINAL2
         ;   ld hl,INIT_INTERLACED_CURVES
         ;   ld (POK_CURVES_TYPE+1),hl         
      ;      ld a,0
      ;      ld (MANAGE_JUMP_LOGO),a
            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_I1+2),a 

            ld a,254
            ld (EACH_LINE_I2+1),a
            ld (EACH_VBL_I2+1),a

.GOTO           
            defs 1+2,0
           ; defs 6-4,0


            ld hl,MODE0_MODE2 
            ld (MODES+1),hl

            ld hl,MODE2_MODE0 
            ld (MODES_EXIT_LOGO+1),hl     
 
;
            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;                     
            ret 


;
EFFET_START
; black UPPER ZONE            
            xor a ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a

; TOP zone
            ld hl,MODE2_MODE2
            ld (MODES+1),hl    
.GOTO          
            defs 3,0
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
            ld bc,&7f01
            out (c),l
;            inc a
            out (c),c
            ld a,84
            out (c),a
;
; BOTTOM zone
            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&30 ; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
;
EFFET_START1
; black UPPER ZONE with INTERLACED
;   ld hl,INIT_INTERLACED_CURVES ; 8 NOPS for
            ld hl,INIT_NORMAL_CURVES ; 8 NOPS for
            ld (POK_CURVES_TYPE+1),hl ; this routine
;            
            ld l,MODE2
            jr EFFET_START.GOTO


EFFET_EMPTY_BLACK
;
; moving LOGO, NO scrollers are visible!!!
            defs 4+4+4,0
            ld a,0

            ld (MANAGE_JUMP_LOGO),a
         ;     defs 3,0  
; TOP zone
            ld hl,MODE2_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
            ld bc,&7f01
      ;      out (c),l
;            inc a
            out (c),c
            ld a,84
            out (c),a

            ld hl,MODE2_MODE2
            ld (MODES_EXIT_LOGO+1),hl   
;                    
            ret
EFFET_START_BLACK
;
; moving LOGO, NO scrollers are visible!!!
            defs 4+4+4-6,0
 ;
             ld a,&C4
             ld (POK_BK_TRANS+1),a
;             
            ld a,&2c
 
            ld (MANAGE_JUMP_LOGO),a
         ;     defs 3,0  
; TOP zone
            ld hl,MODE2_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
            ld bc,&7f01
      ;      out (c),l
;            inc a
            out (c),c
            ld a,84
            out (c),a
          
  ;          ld (POK_INK1_MODE+2),a            
;
; BOTTOM zone
            ld hl,MODE2_MODE2
            ld (MODES_EXIT_LOGO+1),hl   
;                    
            ret
;
EFFET_START3
            ld hl,INIT_NORMAL_CURVES
        ;  ld hl,INIT_NORMAL_CURVES ; 8 NOPS for
            ld (POK_CURVES_TYPE+1),hl
;            
            xor a
            ld (MANAGE_JUMP_LOGO),a
.GOTO           
            defs 6+6-4,0
; TOP zone
            ld hl,MODE1_MODE1
            ld (MODES+1),hl    

 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
        ;    ld b,&7f
       ;     out (c),l
;            
     ;       ld a,91
    ;        ld (POK_INK1_MODE+2),a  
;
; BOTTOM zone
            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   
;
            ld a,&30 ; 30
            ld (POK_OFFSET_TOP+1),a
             ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;                     
            ret 

EFFET_START5
            ld hl,INIT_INTERLACED_CURVES
        ;  ld hl,INIT_NORMAL_CURVES ; 8 NOPS for
            ld (POK_CURVES_TYPE+1),hl
;            
            xor a
            ld (MANAGE_JUMP_LOGO),a
.GOTO           
            defs 6+6-4,0
; TOP zone
            ld hl,MODE1_MODE1
            ld (MODES+1),hl    

            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   
;
            ld a,&30 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;                     
            ret 
EFFET_START4_BNDCP
            ld hl,INIT_NORMAL_CURVES
            ld (POK_CURVES_TYPE+1),hl
            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
;            
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
.GOTO           
            defs 6+16-4-1,0 
            ld a,&32 ; BNDCP
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a                              
            ret 

EFFET_START4_BNDCP_MOVES
            ld hl,INIT_NORMAL_CURVES
            ld (POK_CURVES_TYPE+1),hl
             ld a,1        
            ld (EACH_LINE1+1),a
            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
;            
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
.GOTO           
            defs 6+16-4-1-6,0 
            ld a,&32 ; BNDCP
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a                              
            ret       
EFFET_START4_BNDCP_MOVES2
           ld hl,INIT_INTERLACED_CURVES
            ld (POK_CURVES_TYPE+1),hl


            ld a,2
            ld (EACH_VBL1+1),a
            ld a,3        
            ld (EACH_LINE1+1),a
;            
            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 
;            
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
.GOTO           
            defs 6+16-4-1-6-6,0 
            ld a,&32 ; BNDCP
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a                              
            ret  


;            
EFFET_STATIC_WECODE1
                ld a,0
                jr EFFET_STATIC_WECODE.GOTO

EFFET_STATIC_WECODE
        
                defs 3,0
            ld a,&2c ; &2c;  0 for STOP
.GOTO   


            ld (MANAGE_JUMP_LOGO),a
;
            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
          ;  defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
        
          ;  defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
        defs 7+2-8,0
            ld hl,MODE0_MODE1
            ld (MODES+1),hl   
;            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
        ;    ld a,&22; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_TESTM2B
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
            defs 3,0
            jr EFFET_TESTM2.GOTO

EFFET_TESTM2
            ld a,0 ; 0 for STOP
            ld (MANAGE_CYCLE),a
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
.GOTO
            defs 6,0
            ld hl,MODE0_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
        ;    ld b,&7f
        ;    out (c),l
;
; BOTTOM zone
            ld hl,MODE0_MODE2
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&32
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            nop
            ret 

EFFET_TESTM1M0_B
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
            defs 3,0
            jr EFFET_TESTM1M0.GOTO
EFFET_TESTM1M0
            ld a,0 ; 0 for STOP
            ld (MANAGE_CYCLE),a
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
.GOTO
            defs 6,0
            ld hl,MODE1_MODE0
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
       ;     ld b,&7f
       ;     out (c),l
;
; BOTTOM zone
            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&30 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            nop
            ret 

;
EFFET_TEST2B
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
            defs 3,0
            jr EFFET_TEST2.GOTO

EFFET_TEST2
            ld a,0 ; 0 for STOP
            ld (MANAGE_CYCLE),a
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
.GOTO
            defs 6,0
            ld hl,MODE1_MODE1
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
        ;    ld b,&7f
        ;    out (c),l
;
; BOTTOM zone
            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&30 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            nop
            ret 


EFFET_TESTB
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
            defs 3,0
            jr EFFET_TEST.GOTO

EFFET_TEST
            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
.GOTO
            defs 6,0
            ld hl,MODE0_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
      ;      ld b,&7f
       ;     out (c),l
;
; BOTTOM zone
            ld hl,MODE0_MODE2
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&20
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            nop
            ret 

EFFET1      ld a,0 ; 0 for STOP
            ld (MANAGE_CYCLE),a
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
.GOTO
            defs 6,0
            ld hl,MODE2_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
      ;      ld b,&7f
      ;      out (c),l
;
; BOTTOM zone
            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&30 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld a,&30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
            nop
            ret 
;

EFFET1_A    ld a,&3c
            ld (MANAGE_CYCLE),a
            defs 3,0
            jr EFFET1.GOTO

EFFET1_B    ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
            defs 3,0
            jr EFFET1.GOTO
;
EFFET2      ld a,&3c
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE1_MODE1
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
        ;    ld b,&7f
        ;    out (c),l
; BOTTOM zone
            defs 6,0
            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&2020
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 
;            
EFFET3      ld a,&3d
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
;            
; TOP zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
        ;    ld b,&7f
        ;    out (c),l
            defs 6,0
; BOTTOM zone
            ld hl,MODE0_MODE2
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&3222
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 
;
EFFET3_A      ld a,&3d
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
;            
; TOP zone
            ld hl,MODE0_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
           ;    ld b,&7f
        ;    out (c),l
        defs 6,0
; BOTTOM zone
            ld hl,MODE0_MODE2
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&2222
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 
;
EFFET3_B     ld a,&3d
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
;            
; TOP zone
            ld hl,MODE0_MODE2
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
           ;    ld b,&7f
        ;    out (c),l
            defs 6,0
; BOTTOM zone
            ld hl,MODE1_MODE1
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&2220
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 





EFFET4      ld a,&3C ; 0 for STOP
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
;
; TOP zone
            ld hl,MODE1_MODE0
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
          ;    ld b,&7f
        ;    out (c),l
        defs 7,0
; BOTTOM zone
            ld hl,MODE2_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&3032
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 


EFFET5      ld a,&3c
            ld (MANAGE_CYCLE),a
            ld a,0
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE1_MODE0
            ld (MODES+1),hl    
;            ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
           ;    ld b,&7f
        ;    out (c),l
        defs 7,0
; BOTTOM zone
            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&3030
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
              ret 
;            
EFFET6      ld a,&3d
            ld (MANAGE_CYCLE),a
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
            ld hl,MODE1_MODE0
            ld (MODES+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
          ;    ld b,&7f
        ;    out (c),l
            defs 7,0
; BOTTOM zone
            ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld de,&3030
            ld a,d
            ld (POK_OFFSET_TOP+1),a
            ld a,e
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;         
            ret 

 
EFFET_SWITCH_BANK_C5 ;ld a,&3d
      ; breakpoint
             ;ld (MANAGE_CYCLE),a
            ;  defs 7+5,0
             ld a,&C5
             ld (POK_BK_TRANS+1),a
;             
            ld a,&2c
            ld (MANAGE_JUMP_LOGO),a

           ld a,1
           ld (EACH_LINE1+1),a   
           ld a,1
           ld (EACH_VBL1+1),a

; TOP zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl  
            ld (MODES_EXIT_LOGO+1),hl    
 ;           ld a,l
 ;           ld (POK_EXIT_LOGO_MODE+1),a
          ;    ld b,&7f
        ;    out (c),l
; BOTTOM zone
;            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&30 ; 30
;
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;         
            ret
;  
EFFET_BND30Y
            ld a,0 ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
           ld a,2
           ld (EACH_LINE1+1),a   
           ld a,1
           ld (EACH_VBL1+1),a
.GOTO          
           ; defs +2+3-6-6,0

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl 
            ld (MODES_EXIT_LOGO+1),hl   

       ;     ld a,&32; 30
      ;      ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_BND30Y2
            ld a,&2c ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
           ld a,1
           ld (EACH_LINE1+1),a   
           ld a,1
           ld (EACH_VBL1+1),a
.GOTO          
           ; defs +2+3-6-6,0

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE2_MODE0
            ld (MODES+1),hl 
            ld (MODES_EXIT_LOGO+1),hl   

       ;     ld a,&32; 30
      ;      ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_STILL
            ld a,0 ; 0 for STOP
            ld (MANAGE_JUMP_LOGO),a
; TOP zone
           ld a,1
           ld (EACH_LINE1+1),a   
           ld a,255
           ld (EACH_VBL1+1),a
.GOTO          
           ; defs +2+3-6-6,0

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a 

            ld a,&32 ; 30
            ld (POK_OFFSET_TOP+1),a
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
        ;    ld a,&32
        ;    ld (POK_POS_OFFSET_AFTER_LOGO+2),a
; BOTTOM zone
            ld hl,MODE0_MODE1
            ld (MODES+1),hl 
            ld (MODES_EXIT_LOGO+1),hl   

       ;     ld a,&32; 30
      ;      ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret

EFFET_GREET
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret            


EFFET_WECODE2
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEXI2/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_INTERLACED_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE2_MODE1
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 
EFFET_WECODE
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE2_MODE1
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 

EFFET_GREETR
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE2_MODE0
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 
EFFET_GREETR2
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2+13-12,0    
            ld (POK_CURVES_TYPE+1),hl    
;

        ld a,3        
        ld (EACH_VBL1+1),a
        ld a,2        
        ld (EACH_LINE1+1),a
        


  ;          ld hl,MODE2_MODE0
  ;          ld (MODES+1),hl   

  ;          ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 

EFFET_GREETR3
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEXI/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_INTERLACED_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE2_MODE0
            ld (MODES+1),hl   
;             ld hl,MODE1_MODE0
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret 

EFFET_CREDITS_INT1
        
            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_I2+2),a
            ld hl,INIT_NORMAL_CURVES ; INIT_INTERLACED_CURVES 
            defs 3,0
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            defs 3-2,0    
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
;
EFFET_CREDIT_POL1
        
            ld a,&2c ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3,0

.GOTO          
            defs 3-2+13,0    
            ld (POK_CURVES_TYPE+1),hl    

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret   
EFFET_CREDIT_POL2_STOP_JUMP
        
            ld a,0; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
                JR   EFFET_CREDIT_POL1.GOTO                  

EFFET_CREDITS_THISC5
;
      ;      defs 3+5-6,0
         ld a,&c5
         ld (POK_BK_TRANS+1),a

            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_I2+2),a
            ld hl,INIT_INTERLACED_CURVES 
            JR EFFET_CREDITS_THISC4.GOTO

EFFET_CREDITS_THISC4
;
            defs 3,0
         ld a,&c4 
         ld (POK_BK_TRANS+1),a

            ld a,0 ; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_I2+2),a
            ld hl,INIT_INTERLACED_CURVES 
            
 ;           defs 3,0
 ;           jr EFFET_CYCLING.GOTO
.GOTO          
            
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
  ;          ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret
;

EFFET_STATIC_DESIRE_SWITCH_C7
        
                 
          ld a,&C7
        ld (POK_BK_TRANS+1),a 

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3+2-1,0
 
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret    

EFFET_STATIC_DESIRE
        
                 
           xor a; &2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3+2,0
 
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE0_MODE2
            ld (MODES+1),hl   
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&20 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret  

EFFET_BOEUF_SWITCHC5

        ld a,&C5
        ld (POK_BK_TRANS+1),a 

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3+2-1,0
 
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE1_MODE0
            ld (MODES+1),hl   
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret  
     
EFFET_BOEUF
        
            ld a,&2c;  0 for STOP
            ld (MANAGE_JUMP_LOGO),a

            ld a,TAB_MOVEX/256
            ld (STORE_TAB_MOVE_1+2),a
            ld hl,INIT_NORMAL_CURVES 
            defs 3+2-1,0
 
            ld (POK_CURVES_TYPE+1),hl    
            ld hl,MODE1_MODE0
            ld (MODES+1),hl   
            ld (MODES_EXIT_LOGO+1),hl   

            ld a,&22 ; 30
            ld (POK_OFFSET_TOP+1),a
 ;            ld a,&20; 30
            ld (POK_POS_OFFSET_AFTER_LOGO+2),a
;
            ret  
;                  

Full Source

Show Source
	include once "../linking/src/limited_duration.asm"

DISABLE_EXIT equ false ; true ; Set to true while system is broken

EXIT
;
 ;       breakpoint
SAUVESP	ld sp,&1000
ENDPOS
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a
;	ld bc,&bc03
  dec b
  inc c
	ld a,&8e
	out (c),c
	inc b
	out (c),a
;
	ld b,&7f
	out (c),a	 ; mode 2
;
	ld c,1
	out (c),c
	ld a,84   
	out (c),a	; all in BLACK

    IF TESTBRK=1
	breakpoint
    endif
	ld bc,&bc05
	out (c),c
	inc b

aretard	ld a,0+R5
	out (c),a
;ld bc,&7f8e
;	out (c),c

    nop
	ei
	nop
	di
;

    ld hl,&2150
	ld bc,&bc0c
	out (c),c
	inc b
	out (c),h
    dec b
    inc c
    out (c),c
    inc b
    out (c),l
;

;
;    breakpoint
;	

 IF SELECTED_CRTC = 0
ADAPT_CRTC	add a,1 ; +1
 defs 32,0 ;  defs 64,0
    endif
 IF SELECTED_CRTC = 1
ADAPT_CRTC	add a,1
  defs 64,0 ; +1
    endif
 IF SELECTED_CRTC = 2
ADAPT_CRTC	add a,1
  defs 64,0 ; +1
    endif

 IF SELECTED_CRTC = 3
ADAPT_CRTC	add a,1 ; +1
 ;defs 64,0
    endif

;  defs 64,0
;
VARIO2
	ld b,a
LOOP2
 ;   defs 60,0
		exx
EFFET   call EFFET1 
		exx
		defs 3,0
	djnz LOOP2
;
;

;	defs 6,0
;
	;	call COLOR ; 210 NOPS
				
COLOR   
;	ld bc,&7f8c
;	out (c),c
;	defs 7-1,0
TABCOLOR ld hl,TCOL_MAIN
;
	ld bc,&7f00
BOUCOLOR
	out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c 
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l  
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a 
	inc l
	inc c
    out (c),c 
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c 
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)  
	out (c),a
;	ret	
;			


		call ROUTINE_TRANSFERT ; 107 NOPS
;		
;	 IF TESTBRK=1
	breakpoint
 ;   endif
;
    ld bc,&bc05	 ; quand C9=0
	out (c),c
	inc b
;	xor a
    defb &ed,&71


 IF SELECTED_CRTC = 0
;ADAPT_CRTC	add a,1 ; +1
 ; defs 64,0
  defs 32,0
    endif

  if SELECTED_CRTC = 2
       ld bc,#bc07 ; On repositionne la VBL
 ;      xor a
       out (c),c
       inc b
       defb &ed,&71
	     nop
		 nop
 endif	

 if SELECTED_CRTC = 3 
  breakpoint
       ld bc,#bc07 ; On repositionne la VBL
 ;      xor a
       out (c),c
       inc b
       defb &ed,&71
     nop
	 nop


 endif	

   if SELECTED_CRTC = 0 ; was 0 
  breakpoint
       ld bc,#bc07 ; On repositionne la VBL
 ;      xor a
       out (c),c
;	   
       inc b
	   ld a,0
 ;     defb &ed,&71
 
	out (c),a
	;   nop
 endif	

   defs 6+6+8-1-14,0


;		breakpoint
	    LD	BC,#F40E
        OUT	(C),C
        LD	BC,#F6C0
        OUT	(C),C
;  XOR	A
;  OUT	(C),A
  		defb &ed,&71
        LD	BC,#F792
        OUT	(C),C
        LD	BC,#F645
        OUT	(C),C
        LD	B,#F4
        IN	A,(C)
        LD	BC,#F782
        OUT	(C),C
;  LD	BC,#F600
;  OUT	(C),C
		dec b
		defb &ed,&71
;		
        RLA	
;

		if DISABLE_EXIT
			defs 3
		else
			call nc,EXIT_PART
		endif

 
    defs 6-1,0
  breakpoint
		; @ eliot : you have to find a place to do that ;) here it breaks everything
; 14 NOPS 		
		CHECK_IF_PART_IS_OVER()
		jr z, EXIT_PART
  breakpoint
;

  if SELECTED_CRTC = 1 ; was 1
       ld bc,#bc07 ; On repositionne la VBL
 ;      xor a
       out (c),c
       inc b
       defb &ed,&71
	     nop
		 nop
 endif	





		ld bc,&bc04
   		out (c),c
   ;		ld bc,&bd01  
;		out (c),c
	;

  


	jp MAIN
;	

ROUTINE_TRANSFERT
POK_BK_TRANS	ld bc,&7fc4
				out (c),c
	;		breakpoint
				read "transfert_gfx.asm"
			ld bc,&7fc0
			out (c),c
			ret
EXIT_PART
;
		
		ld bc,#bc07 ; On repositionne la VBL
 ;      xor a
       out (c),c
       inc b
       defb &ed,&71

MAIN2
	breakpoint
;
	ld bc,&bc04
	out (c),c
	ld bc,&bd00+38
	out (c),c
   ei

	DS_SECURE_WAIT_VSYNC()
	ld bc,&bc01
	out (c),c
	inc b
    out (c),0
;
	
	call ds_stop_sound
;

START_DS 	equ &6000
RESTORE_DEMOSYSTEM
; Demosystem is max &2000 bytes 
;
; first &600 bytes of the demosystem are copied from the BANK C6 (after the MUSIC)
; 
		di
		ld bc,&7fc6
		out (c),c
		ld hl,&7500
		ld de,&a000
		ld bc,&600
		ldir
;		
		ld bc,&7fc7
		out (c),c
		exx 		
		ld de,START_DS
		ld bc,&600
		ld hl,&a000
		ldir
		exx

; then 16*&1A0 bytes are copied from the &C000 page 
;
        ld (SAVE_SP2+1),sp
;
	    ld sp,TABLE_RESTORE_DS
;			
		ld b,16
RESTORE_1A0_BYTES
;
		
		exx
		pop hl
		ld bc,&1a0
		ldir
		exx

		djnz RESTORE_1A0_BYTES
;
;
;

SAVE_SP2 ld sp,0


		ei

;
	DS_SECURE_WAIT_VSYNC()
	;DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC(0, 0x1e, 0x32, 0x2e)

	; DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(0x00, 0x1e)
;
    di
    ld hl, start_loader
    ld de, 0x100
    ld bc, stop_loader - start_loader
	ldir
    ld sp, 0x100
    jp 0x100
	align 2
TABLE_RESTORE_DS
	defw &C260,&CA60,&D260,&DA60,&E260,&EA60,&F260,&FA60
	defw &C660,&CE60,&D660,&DE60,&E660,&EE60,&F660,&FE60	
start_loader
    rorg 0x100
        include "../linking/src/load_intro_loader.asm" ;
    rend
stop_loader
;

	DS_PRODUCE_STOP_SOUND_ROUTINE()

Full Source

Show Source
	include once "../linking/src/demosystem/public.asm"


	org 0x180
	run $


	di
	ld hl, 0xc9fb : ld (0x38), hl
	ei

	jp show_image
loader_start
	rorg 0x100
load_next
	;include "../linking/src/load_outer_space.asm"
	include "../linking/src/load_make_it_easy.asm"
	rend
loader_stop

show_image
	include "../linking/src/demosystem/linker_common.asm"
	SELECTED_CRUNCHER=CRUNCHER_EXOMIZER

	ld hl, palette_fadein.data
	call palette_fadein.set_palette

	ld bc, 0x7f10 : out (c), c
	ld bc, 0x7f54 : out (c), c

    UNCRUNCH C000, 0xc000

	ld bc, 0xbc00 + 12
	ld hl, 0x3000
	out (c), c : inc b : out (c), h : dec b : inc c
	out (c), c : inc b : out (c), l

	halt : DS_CRTC_HORIZONTAL_TRANSITION_ONLY(&2e, 0x32)

palette_fadein

.loop
	DS_SECURE_WAIT_VSYNC()

	; TODO add a transition here


	ld bc, 0xbc00 + 1 : out (c), c
	ld bc, 0xbd00 + 96/2 : out (c), c

	ld bc, 0xbc00 + 6 : out (c), c
	ld bc, 0xbd00 + 25 : out (c), c

;	ld bc, 0xbc02 : out (c), c 
;	ld bc, 0xbd00 + 0x32 : out (c), c

	; select the right palette
	ld hl, .data
.palette_address equ $-2
	call .set_palette

	halt : halt : halt

	; change the palette every x frames
	ld a, 4
.wait equ $-1
	inc a : and %11
	ld (.wait), a
	jp nz, .loop

	ld hl, (.palette_address)
	ld de, 4
	add hl, de
	ld (.palette_address), hl

	ld a, (hl) : or a
	jp nz, .loop

	ld hl, loader_start
	ld de, load_next
	ld bc, loader_stop-loader_start
    ldir


	jp load_next
	
.set_palette
	ld b, 0x7f : xor a
.ga_loop
	ld c, (hl)
	out (c), a
	out (c), c

	inc hl
	inc a
	cp 4 : jp nz, .ga_loop
	ret

.data
	incbin "loading_fadeout.ga", 4*16, 4
	incbin "loading_fadeout.ga", 3*16, 4
	incbin "loading_fadeout.ga", 2*16, 4
	incbin "loading_fadeout.ga", 1*16, 4
	incbin "loading_fadeout.ga", 0*16, 4
	db 0


	INSTALL_UNCRUNCHER()



	LOAD_N_CRUNCH C000, "loading.scr"



	SAVE "MAKEIT.LOA"

Full Source

Show Source
;
	
;
; 89 NOPS
;
SCENARIO
               ; breakpoint
SCENARIO_TIMER 	ld a,1                  ; 2
				dec a                   ; 1
				ld (SCENARIO_TIMER+1),a ; 4
				jp nz,LEAVE_SCENARIO_MANAGEMENT   ; 2
;
NEW_SCENARIO
	;	breakpoint
POS_TAB_SCE ld hl,TAB_SCENARIO
	    ld a,(hl)
	    or a
	    jr nz,PAS_FIN_TAB
;
	    ld hl,TAB_SCENARIO_REAL_START
	    ld a,(hl)	
        jr PAS_FIN_TAB+7	
;
PAS_FIN_TAB

		
        defs 7,0
	    ld (SCENARIO_TIMER+1),a
		inc l
		ld a,(hl)
; 
		ld (TRANSFERT_PAL+1),a  ; next VBL
;		
	    inc l
	    ld e,(hl)
	    inc l
	    ld d,(hl)
		ld (EFFET+1),de    ;  ; next VBL
;			
		inc l
		ld e,(hl)
	    inc l
	    ld d,(hl)
		ld (SOURCE+1),de	 ; next VBL
		inc l
		ld e,(hl) 
	    inc l
	    ld d,(hl)
		ld (DESTINATION+1),de ;  ; next VBL
		ld a,255
		ld (INC_POSITION_TRANSFERT+1),a

	    inc hl
	    ld (POS_TAB_SCE+1),hl
    
        jr LEAVE_SCENARIO_MANAGEMENT+48+22+2+5+2
;	    ld (EFFET+1),de	
;	    ret

;            
LEAVE_SCENARIO_MANAGEMENT
            defs 48+22+2+5+2,0
;
	;	BREAKPOINT

	

	;		  defs 60-39,0
	;	defs 22,0
    ;        breakpoint

Full Source

Show Source
; C:\BND5 demo\MakeItEasy>..\tools\bndbuild.exe acedsk


	include once "../linking/src/demosystem/common.asm"

Reg2    equ &30+2
;
;		breakpoint
		  
TABLE_PRECAL_OFFSET equ FILE_OFFSET+3

    JP REAL_START
; these routines have been moved to have the same 
; CALL addresses for all CRTC versions...	
	read "routine_hbl_positions.asm"
	read "routine_logozone.asm"
	read "exit.asm"
;	
REAL_START	
	di
	ld hl,&c9fb  
	ld (&0038),hl
	im 1 
;
; init music
;

	; already done in fact
	ld bc,#bc07 
    out (c),c 
    inc b 
   	defb &ed,&71 
; R6=1
    ld bc,&bc06
	out (c),c
    ld bc,&bd01
	out (c),c 
;
	LD	BC,#7FC6
	OUT	(C),C
;	
	di			; coz FapInit makes heavy use of SP
    ld	a,HiFapBuff 	; High byte of the decrunch buffer address.
    ld	bc, FapPlay     ; Address of the player binary.
    ld	de, ReturnAddr  ; Address to jump after playing a song frame.
    ld	hl, FapData     ; Address of song data.
    call    FapInit
    ei
;
	LD	BC,#7FC0
	OUT	(C),C
  
	DS_SECURE_WAIT_VSYNC()
;	
    ld hl,&2150
	ld bc,&bc0c
	out (c),c
	inc b
	out (c),h
    dec b
    inc c
    out (c),c
    inc b
    out (c),l

	halt
	halt
	halt
	halt


;	
	; already done in fact
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a	
	halt
	halt

    repeat 5
	halt	
	rend
;
    ld bc,&bc01
	out (c),c
	ld bc,&bd30
	out (c),c	
	ld bc,&bc06
	out (c),c
    inc b
	out (c),c 
	ld bc,&bc04
   	out (c),c
	halt
; CRTC0

; nop
 breakpoint
MAIN	
; VCC=
; VLC=
	
		di
; R4 = 0
   		ld bc,&bd00+0  
		out (c),c

       ld bc,#bc07 ; Kill VBL    
       out (c),c
 	   inc b
	   out (c),b 
		
; MUSIC 644 NOPS for Warlord
		ld bc,&7fc6
		out (c),c
;   	 	di			; Prevent interrupt apocalypse
    	ld	(RestoreSp), sp	; Save our precious stack-pointer
    	jp	FapPlay		; Jump into the replay-routine

ReturnAddr:		; Return address the replay-routine will jump back to

RestoreSp equ $+1

    	ld	sp, 0		; Restore our precious stack-pointer
    ;	ei			; We may enable the maskable interrupts again
  	;	nop
		
        ld bc,&7fc0
		out (c),c
;
READ_SINY	ld hl,TAB_MOVEY+&40-5+50
            if SELECTED_CRTC = 0
			ld a,170
			else
			ld a,(hl)
			endif
;			
MANAGE_JUMP_LOGO  nop ; inc l			
			ld (READ_SINY+1),hl

			ld (R5_CHANGE+1),a

;			breakpoint
; 15 NOPS
			srl a	
			srl a
			srl a
	;		srl a
;			defs 2+2,0
	;		nop
; +6 NOPS
			add a,a
;		breakpoint
			ld (LONG2+1),a
			ld e,a
			ld a,58
			sub e
			ld (LONG1+1),a
;
	 
;		 
CYCLE ld a,3 
MANAGE_CYCLE nop ;dec a
			; inc a
			; nop
	  and 7
	  ld (CYCLE+1),a	   
;
	add a,a
	add a,a
	ld l,a
	ld h,0
	ld de,TAB_CYCLE	
	add hl,de
;
	ld de,POK_CYCLE
	ldi
	ldi
	ldi
	ldi
;	MUSIC WAS HERE

MANAGE_VARIO_R5

R5_CHANGE	ld a,4

			and 7;

			ld (aretard+1),a

	ld e,a
	ld a,8
	sub e
	ld (bretard+1),a
;
   IF TESTBRK=1
	breakpoint
    endif

 if SELECTED_CRTC = 3
   defs 64-&1d-&d,0
		read "manage_scenario.asm"
		 breakpoint;
   ENDIF 

  if SELECTED_CRTC = 0
  ; defs 64-&1d-&d,0
	;	
	defs 64-10-8,0
		 breakpoint
   ENDIF 


 ; defs 2+1+7-4,0 
  ld a,(bretard+1)

	ld bc,&bc05
	out (c),c
	inc b
bretard	ld a,8-R5
	out (c),a 
;

   defs 27,0
	;	ld hl,&3180+8
	;	ld bc,&bc0C
	;	out (c),c
	;	inc b
	;	out (c),h  
	;	ld bc,&bc0d
	;	out (c),c
	;	inc b 
	;	out (c),l 
    	inc a
	
VARIO1
	ld b,a ; 8-R5
LOOP1
    defs 28-10-7,0
POK_CURVES_TYPE	call INIT_NORMAL_CURVES

 exx
       ld bc,&7fc0
		out (c),c
 		ld hl,TABLE_OFFSET_FINAL
		ld b,&7F
MODES	ld de,&8e8e
       exx
	djnz LOOP1
;
;	breakpoint
COMPENSE_R5_0
   IF TESTBRK=1
	breakpoint
 endif


    ld bc,&bc05
	out (c),c
;	R5 still selected
	inc b  
	out (c),0
;
 ;   nop
  if SELECTED_CRTC = 3
  defs &1d+&d,0
  endif
;	

 if SELECTED_CRTC = 0
 ; defs 64,0
 defs 10+8,0
 read "manage_scenario.asm"
  endif
; ************************************************************	
; genere table RET finale à partir des calculs
		ld hl,TABLE_RET
		ld de,TABLE_RET_FINAL
LONG1	ld bc,30
    	LDIR
; 
	ld bc,6+2 ;skip LOGO
	add hl,bc
	ld (POK_ZONE_BAS+1),hl
;	defs 5,0
; positionne la routine logo dans la table 	
	ld hl,POK_LOGO_ZONE
	LDI
	LDI
; puis la zone du bas
POK_ZONE_BAS ld hl,TABLE_RET+2
;	defs 3,0
LONG2		ld bc,28
			LDIR
;			 
   IF TESTBRK=1
	breakpoint
    endif
;	
	ld bc,&bc04 
   	out (c),c
   	inc b
   	defb &ed,&71
	

				ld hl,TABLE+2	 
				ld de,TABLE_OFFSET_FINAL
LONG_OFFSET1	ld bc,(LONG1+1)
    			LDIR
;
				ld (POK_ZONE_BAS_OFF+1),hl
				dec e
				dec e
;
				ex de,hl 
				ld de,&100C
				ld (hl),e
				inc l
				ld (hl),d
				inc l
				ex de,hl				
;				breakpoint
POK_ZONE_BAS_OFF 	ld hl,TABLE+2
				;	ld c,5
			;		add hl,bc
					ld a,l
					add a,7
					ld l,a 
			;		inc l
				ld a,(hl)
				ld (POK_POS_OFFSET_AFTER_LOGO+1),a
				inc l
LONG_OFFSET2	ld bc,(LONG2+1)
				LDIR

;		defs 55,0
;

 if SELECTED_CRTC = 0
	;	read "manage_scenario.asm"
    endif

  if SELECTED_CRTC=1
   defs 64,0
		read "manage_scenario.asm"

   ENDIF 

 if SELECTED_CRTC = 2
		read "manage_scenario.asm"

   ENDIF 




POK_OFFSET_TOP	ld a,&34
	ld bc,&bC0C
	out (c),c
	inc b
	out (c),a
;
	dec b
	inc c
; first offset 
;	ld bc,&bc0d
	out (c),c
	inc b
;R13		ld a,&0043
	ld a,(TABLE+1)
;		ld (R13+1),a
	out (c),a




; CRTC 0
 IF SELECTED_CRTC = 0
 ;	defs 64,0  
	ENDIF 
;	

 IF SELECTED_CRTC = 1
;	defs 64,0  
	ENDIF 

; CRTC 2
 IF SELECTED_CRTC = 2
	defs 64,0  
	ENDIF 
;	
 IF SELECTED_CRTC = 3
	defs 64,0  
	ENDIF 
;	
; start SCROLLINGS splitscreen

		exx

		out (c),e
		
		exx 

; ------------------
; HCC = 20
 
	di
	ld bc,&bc03
	ld de,&0207
	ld hl,8*256+Reg2
;	ld l,Reg2 
;	nop
	ld a,&d
	out (c),c ; REG 3 selected
	inc b
;
START_HBL	
;	breakpoint

	ld (SAUVESP+1),SP 
;	
	ld SP,TABLE_RET_FINAL  ; 3
;
	RET 


	
	read "scenario_table.asm"
	read "effets_scenario.asm"

;



	read "palettes.asm"
; 



align 256 

TCOL_MAIN 	defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
; PEN 12, 13, 14 and 15
POK_CYCLE	defb &5d,&58,&44,&54 
;			defb 86		
			defs 10,75

C1 equ  86
C2 equ	92
C3 equ  92
C4 equ  92
;
TAB_CYCLE   
			repeat 8
			defb #5D,#58,#44,#5F ; 30 Y
			rend

	;		defb C1,C2,C3,C4
	;		defb C2,C3,C4,C1
	;		defb C3,C4,C1,C2
	;		defb C4,C1,C2,C3
	 ;  		defb C1,C2,C3,C4
	;		defb C2,C3,C4,C1
	;		defb C3,C4,C1,C2
	;		defb C4,C1,C2,C3

TAB_SNOW ;   defb 75,84,64,75
		;	defb 84,75,75,64
		;	defb 64,84,84,75
		;	defb 75,64,75,84
		;	defb 84,64,75,84
		;	defb 75,84,75,64
		;	defb 84,75,84,75
		;	defb 64,84,75,84	



  assert $<0x4000

; 


 
      
     

Full Source

Show Source
	org &4000
	incbin "files/LOGO96.SCR"
	
	org &c000
	incbin "files/cycband3.scr"
;
;
INK0 equ 92
INK1 equ 77 ; &55
B1 equ 93 ; 64
B2 equ 87 ; 87
;
R5 equ 0
PAGE_SCROLL = &30 ; &C000
PAGE_LOGO = &10
SELECTED_CRTC = 0
BKMUSIC = &C6
; remplissage de vide
	; add ix,sp ; 4 nops 
	; add ix,ix ; 4 nops
	; dec (ix+0) ; 6 nops
;    
NBMOVESMAX equ 27*4
;
 	BANK BKMUSIC
;	
	org &4000
    BuffSize	equ #B42		; Size of replay buffer given by the cruncher.
    PlayerSize	equ 611			; Size of the FAP player code

    FapInit	equ #7000       	; Address of the player initialization code.
    FapBuff	equ #4000       	; Address of the decrunch buffers (low order byte MUST BE 0).
    HiFapBuff equ #40
    FapPlay	equ FapBuff+BuffSize  	; Address of the player code. Right after the decrunch buffer.
    FapData	equ FapPlay+PlayerSize	; Address of the music data. Right after the player routine.
;
    org	FapInit
     incbin "files/fap-init.bin"
    org	FapPlay
     incbin "files/fap-play.bin"
    org	FapData
     incbin "files/rings2.fap"
;
	BANK &C0

	org &1000
	run &1000

;	write direct "testACE.cod"
	nolist

Reg2    equ &30+2
;
;		breakpoint
		


	di
	ld hl,&c9fb
	ld (&0038),hl
	im 1
;
; init music
;
	ld bc,#bc07 ; Kill VBL
    out (c),c
    ld bc,#bd00 
	out (c),c
;

	LD	BC,#7FC6
	OUT	(C),C
;	
	di			; coz FapInit makes heavy use of SP
    ld	a,HiFapBuff 	; High byte of the decrunch buffer address.
    ld	bc, FapPlay     ; Address of the player binary.
    ld	de, ReturnAddr  ; Address to jump after playing a song frame.
    ld	hl, FapData     ; Address of song data.
    call    FapInit
    ei
;
	LD	BC,#7FC0
	OUT	(C),C

SYNC1

	ld b,&f5
WAIT_VBL1
	in a,(c)
	rra
	jr nc,SYNC1
;	
		ld b,14 ; attente de 32 lignes (4x8)
b14    	defs 60,0 ; 60 Nops
    	djnz b14 	

	halt
	halt
	halt
	halt

	ld bc,&bc01
	ld a,&30
	out (c),c
	inc b
	out (c),a
;	
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a	
	halt
	halt

;
	repeat 6
	halt	
	rend
;
;
MAIN	
; VCC=
; VLC= 	
		di
		nop
	
	   ld bc,#bc07 ; Kill VBL
       out (c),c
 		inc b
	   out (c),b 

;		breakpoint
;		
; 16 lignes initialement
; 12 dans l'essai
;
		ld hl,&1000
		ld bc,&bc0C
		out (c),c
		inc b
		out (c),h
		ld bc,&bc0d
		out (c),c
		inc b
		out (c),l
;		
		defs 20,0
;
READ_SINY	ld hl,TAB_MOVEY
			ld a,(hl)
MANAGE_JUMP_LOGO inc l
			ld (READ_SINY+1),hl
;
	;		ld e,a
	;		ld a,240
	;		sub e

			ld (R5_CHANGE+1),a

;			breakpoint
; 15 NOPS
			srl a	
			srl a
			srl a
	;		srl a
;			and 15
;			inc a
			nop
	;		nop
; +6 NOPS
			add a,a
;		breakpoint


			ld (LONG2+1),a
			ld e,a
			ld a,58
			sub e
			ld (LONG1+1),a


;		
CYCLE ld a,3 
MANAGE_CYCLE dec a
			; inc a
			; nop
	  and 3
	  ld (CYCLE+1),a	   
;
	add a,a
	add a,a
	ld l,a
	ld h,0
	ld de,TAB_CYCLE	
	add hl,de
;
	ld de,POK_CYCLE
	ldi
	ldi
	ldi
	ldi
;	
		ld bc,&bc04
   		out (c),c
   		ld bc,&bd01
		out (c),c
;		ld bc,&bc09
;   		out (c),c
;   		ld bc,&bd07
;		out (c),c
;
; MUSIC
		ld bc,&7fc6
		out (c),c
;   	 	di			; Prevent interrupt apocalypse
    	ld	(RestoreSp), sp	; Save our precious stack-pointer
    	jp	FapPlay		; Jump into the replay-routine

ReturnAddr:		; Return address the replay-routine will jump back to

RestoreSp equ $+1
    	ld	sp, 0		; Restore our precious stack-pointer
    ;	ei			; We may enable the maskable interrupts again
  		nop
		ld bc,&7fc0
		out (c),c
;		
MANAGE_VARIO_R5

R5_CHANGE	ld a,4
		; 	inc a
;			nop
			and 7;
			defs 5,0
;			ld (R5_CHANGE+1),a
;			inc a
			ld (aretard+1),a
;			dec a
	ld e,a
	ld a,8
	sub e
	ld (bretard+1),a
;
	ld bc,&bc05
	out (c),c
	inc b
bretard	ld a,8-R5
	out (c),a
;

    	inc a
;	 breakpoint
VARIO1
	ld b,a ; 8-R5
LOOP1
    defs 60,0
	djnz LOOP1
;


;
;	breakpoint
COMPENSE_R5_0
;	exx
	ld bc,&bc05
	out (c),c
	inc b
	defb &ed,&71 ;	out (c),0
;	

; ************************************************************	
; genere table RET finale à partir des calculs
		ld hl,TABLE_RET
		ld de,TABLE_RET_FINAL
LONG1	ld bc,30
    	LDIR
;
	ld bc,0+6
	add hl,bc
	ld (POK_ZONE_BAS+1),hl
; positionne la routine logo dans la table 	
	ld hl,POK_LOGO_ZONE
	LDI
	LDI
; puis la zone du bas
POK_ZONE_BAS ld hl,00
LONG2		ld bc,28
			LDIR
;
	;		defs 24,0			
;			

;	breakpoint
;	
	ld bc,&bc04
   	out (c),c
   	inc b
   	defb &ed,&71
	
;		ld bc,&bc09
;   	out (c),c
;   	ld bc,&bd07
;		out (c),c
	;;	defs 4,0
;		breakpoint
; genere table offset 
				ld hl,TABLE
				ld de,TABLE_OFFSET_FINAL
LONG_OFFSET1	ld bc,(LONG1+1)
	; dec c
	; dec c 
		;		inc c
		;		inc c

    			LDIR
;

				dec e
				dec e
			;	nop
			;	nop

				ld bc,6
				add hl,bc
				ld (POK_ZONE_BAS_OFF+1),hl
;
				inc l
				ld a,(hl)
				ld (POK_POS_OFFSET_AFTER_LOGO+1),a
;				
				ex de,hl
				ld de,&100C
				ld (hl),e
				inc l
				ld (hl),d
				inc l
				ex de,hl
				
;				breakpoint

POK_ZONE_BAS_OFF 	ld hl,00
					
LONG_OFFSET2	ld bc,(LONG2+1)
		;		dec c
		;		dec c
				LDIR
;e
		defs 4,0
		read "manage_scenario.asm"
;
;	defs 134,0

	ld a,PAGE_SCROLL
	ld bc,&bc0C
	out (c),c
	inc b
	out (c),a
;
; first offset
	ld bc,&bc0d
	out (c),c
	inc b
;R13		ld a,&0043
	ld a,(TABLE_OFFSET_FINAL+1)
;		ld (R13+1),a
	out (c),a
;
;	defs 64,0
;	




; start SCROLLINGS splitscreen
;

	exx
	ld b,&7F
	ld de,&8e8c
	ld hl,TABLE_OFFSET_FINAL+2
	exx 
; ------------------
; HCC = 20

	di
	ld bc,&bc03
	ld de,&0207
	ld h,8
	ld l,Reg2
	ld a,&d
	out (c),c ; REG 3 selected
	inc b
;
START_HBL	
;	breakpoint

	ld (SAUVESP+1),SP 
;	
	ld SP,TABLE_RET_FINAL  ; 3
;
	RET
;



	read "routine_hbl_positions.asm"
	read "routine_logozone.asm"
	read "exit.asm"
	read "scenario_effets.asm"
;CHANGE_OFFSET2

;
	exx
	out (c),e  ; MODE droite
	exx
;	nop
;	ld l,&0e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2

	exx
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22

;	ld de,&0207
	
	ret
COLOR   

	ld bc,&7f8c
	out (c),c
TABCOLOR ld hl,TCOL_SHADE1 

	ld c,0
BOUCOLOR
	out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	inc l
	inc c
    out (c),c
	ld a,(hl)
	out (c),a
	ret	
align 256

TCOL_SHADE1 defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2
POK_CYCLE	defb 68,68,68,85
;			defb 86		
			defs 10,75

TAB_CYCLE   defb B1,B1,B1,B2
			defb B1,B1,B2,B1
			defb B1,B2,B1,B1
			defb B2,B1,B1,B1

	align 256

TABLE ; Offset, R13 selection for OUTI
    repeat 16
	  defw &060d     
    rend  
; 
;	defw &000c ; LOGO Offset, R12 selection for OUTI 
;	
	  repeat 16
	  defw &060d     
    rend  
	defs 32,0
;	defw &000d ; LOGO Offset, R12 selection for OUTI 
;
TABLE_OFFSET_FINAL
	repeat 29
	defw &060d
	rend
;
	defw &000d

align 256



TABLE_RET
	repeat &40
	defw POS7_2
	rend

TABLE_RET_FINAL
		repeat 15
		defw POS7_2
        rend
;
		defw LOGO_ZONE
;
		repeat 14
		defw POS7_2
		rend
POK_EXIT defw EXIT
;		defw EXIT
POK_LOGO_ZONE defw LOGO_ZONE	
	align 256

TABLE_MOVE
; 30 positionss
		defw POS6_2,POS6_2,POS6_2,POS6_2
		defw POS7_2,POS7_2,POS7_2,POS7_2
		defw POS8_2,POS8_2,POS8_2,POS8_2
		defw POS9_2,POS9_2,POS9_2,POS9_2
;		
		defw POS10_2,POS10_2,POS10_2,POS10_2
		defw POS11_2,POS11_2,POS11_2,POS11_2
		defw POS12_2,POS12_2,POS12_2,POS12_2
		defw POS13_2,POS13_2,POS13_2,POS13_2
		defw POS14_2,POS14_2,POS14_2,POS14_2
		defw POS15_2,POS15_2,POS15_2,POS15_2


		defw POS16_2,POS16_2,POS16_2,POS16_2
		defw POS17_2,POS17_2,POS17_2,POS17_2
        repeat 4
		defw POS18_2
		rend
        repeat 4
		defw POS19_2
		rend
		repeat 4
		defw POS20_2
		rend
		repeat 4
		defw POS21_2
		rend
		repeat 4
		defw POS22_2
		rend 
		repeat 4	
		defw POS23_2
		rend
		repeat 4
		defw POS24_2
		rend
		repeat 4
		defw POS25_2
		rend 
		repeat 4
		defw POS26_2
		rend   
		repeat 4
		defw POS27_2
		rend 
		repeat 4
		defw POS28_2
		rend
		repeat 4
		defw POS29_2
		rend
		repeat 4
		defw POS30_2
		rend
		repeat 4 
		defw POS31_2
		rend
		repeat 4
		defw POS32_2
		rend
		repeat 4
		defw POS33_2
		rend
		repeat 4
		defw POS34_2
		rend
		repeat 4+16
		defw POS35_2
		rend

        align 256
TABLE_PRECAL_OFFSET
; 30*4 positions
     
	incbin "files/offset.tab"
;
    align  256
;
TAB_MOVEX
;   incbin "files/move-x3.tab"

;	defb 

	repeat 8
	defb 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
	rend 


TAB_MOVEY
	incbin "files/MOVEY3.TAB"


      
     

Full Source

Show Source
 	BuffSize	equ #B42		; Size of replay buffer given by the cruncher.
    PlayerSize	equ 611			; Size of the FAP player code

;    FapInit	equ #7000       	; Address of the player initialization code.
    FapBuff	equ #4000       	; Address of the decrunch buffers (low order byte MUST BE 0).
    HiFapBuff equ #40
    FapPlay	equ FapBuff+BuffSize  	; Address of the player code. Right after the decrunch buffer.
    FapData	equ FapPlay+PlayerSize	; Address of the music data. Right after the player routine.

    org	FapPlay
     incbin "files/fap-play.bin"
    org	FapData
   ;  incbin   "files/vertexzeta.fap"
      incbin "files/hbl7.fap"
   
;     org	FapInit
 
FapInit     incbin "files/fap-init.bin"

   assert $<0x7FFF
;   
     print "FapInit ", {hex}FapInit
     print "FapPlay ", {hex}FapPlay
     print "FapData ", {hex}FapData
     print "After FapData ", {hex}$

Full Source

Show Source
align 256 
; position in table for each of the 23 sets 
SET_PAL_0P equ 0
SET_PAL_1P equ 11
SET_PAL_2P equ 22
SET_PAL_3P equ 33
SET_PAL_4P equ 44
SET_PAL_5P equ 55
SET_PAL_6P equ 66 
SET_PAL_7P equ 77
SET_PAL_8P equ 88 ; 
SET_PAL_9P equ 99
SET_PAL_10P equ 110
SET_PAL_11P equ 121
SET_PAL_12P equ 132
SET_PAL_13P equ 143
SET_PAL_14P equ 154
SET_PAL_15P equ 165
SET_PAL_16P equ 176
SET_PAL_17P equ 187
SET_PAL_18P equ 198
SET_PAL_19P equ 209
SET_PAL_20P equ 220
SET_PAL_21P equ 231
SET_PAL_22P equ 242
;
SOURCE_PAL 	
; 11 colors per SET 
; first value is PEN 1 for MODE 2
; first 3 values are PEN 1 (already used for MODE 2), PEN 2, PEN 3 for Mode 1 zone
; then colors for MODE 0 : PEN 4, PEN 5...
;
; PEN 11, 12, 13, 14 and 15 WERE planned for CYCLING...
;
; each set is used for MODE 2, MODE 1 and MODE 0
;
; PEN 1 to PEN 11
; black PALETTE MODE 1 useful for intro
SET_PAL_0		defb 84,84,84,#4C,#5C,#4E,#4D,#4A,#5B,#57,#4B     
; 8 BIT LOVE  OK! + mode 1 DARK VIOTET
;SET_PAL_1		defb &5d,&58,&5f,#4C,#5C,#4E,#4D,#4A,#5B,#57,#4B  
 SET_PAL_1       defb  #5D, #58, #5F, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B


;SET_PAL_2		defb 91,69,75,#4C,#5C,#4E,#4D,#4A,#5B,#57,#4B     ; 8 BIT LOVE
 SET_PAL_2       defb #57, #55, #53, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B


;SET_PAL_3		defb 78,76,67,#4C,#5C,#4E,#4D,#4A,#5B,#57,#4B     ; 8 BIT LOVE
 SET_PAL_3       defb #4E, #58, #43, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B



; Desire
SET_PAL_4		defb 89,85,75,#5C,#45,#4D,#47,#4F,#5B,#57,#4B ; ,#5D,#58,#44,#5F ; 
; CREDITS INTRO
SET_PAL_5		defb 89,69,79,#45,#5B,#47,#5C,#4F,#5E,#43,#4B  ; 
; BOEUF Texture
SET_PAL_6       defb &47,&40,75,#45,#5C,#47,#55,#4C,#4E,#57,#4B ; ,#5D,#58,#44,#5F ;&5d,&58,&44,&54
; credits POLAR
SET_PAL_7       defb 79,&58,&5f,#41,#5B,#59,#43,#5E,#4E,#53,#4B ;
; 30 YEARS - OK! + SET 1 mode 1 red
SET_PAL_8       defb 75,92,89,#57,#55,#4D,#4F,#41,#59,#57,#4B ; &4b,&5f,&5b,&4d,&4f,&55,&57,&40 ;&5d,&58,&44,&54 ; extra datas, stored in the CYCLING TABLE...
; 30 YEARS - OK! + SET 2 mode 1 yellow/green
SET_PAL_9       defb 75,69,67,#57,#55,#4D,#4F,#41,#59,#57,#4B  ;&5d,&58,&44,&54
; 30 YEARS - Ok! + SET 3 mode 1 grey
SET_PAL_10       defb 69,88,91,#57,#55,#4D,#4F,#41,#59,#57,#4B  ;&5d,&58,&44,&54
; HOT BOLD  + orange/red
SET_PAL_11       defb 78,76,78,#4D,#45,#4F,#47,#5B,#43,#57,#4B; ,&5d,&58,&54,&54   
; STATIC DESIRE
SET_PAL_12       defb 89,76,78,#45,#4D,#4F,#5C,#46,#5B,#57,#4B ; ,#5D,#58,#44,#5F; ,&5d,&58,&54,&54  
; GREETS + 
SET_PAL_13       defb 89,76,78,#4D,#4F,#45,#47,#44,#5B,#57,#4B; ,&5d,&58,&54,&54  
SET_PAL_14       defb 76,76,78,#4D,#4F,#45,#47,#44,#5B,#57,#4B ;,&5d,&58,&54,&54  
; BND
;SET_PAL_15       defb 69,76,75,#55,&4d,#4F,#59,#45,#57,#5c,#4B; ,&5d,&58,&54,&54  
 SET_PAL_15       defb #4D, #5D, #4F, #55, #4D, #4F, #59, #45, #57, #5C, #4B

; 30 Y + STILL
SET_PAL_16      defb 75,69,67,#57,#55,#4D,#4F,#41,#59,#57,#4B  ;&5d,&58,&44,&54 ,&5d,&58,&54,&54  
; fuel + BND
SET_PAL_17       defb 88,&5d,&4d,#55,#4D,#4F,#59,#45,#57,#5C,#4B; ,&5d,&58,&54,&54  
; static BND
SET_PAL_18       defb 92,64,91,#55,#4D,#4F,#59,#45,#57,#5C,#4B; ,&5d,&58,&54,&54  
SET_PAL_19       defb 91,76,78,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54  
; STATIC BND CARRE _HOLD BOLD
SET_PAL_20       defb 86,89,91,#55,#4D,#4F,#59,#45,#57,#5c,#4B; ,&5d,&58,&54,&54  
; START4
;SET_PAL_21       defb 69,91,75,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54  
;SET_PAL_21       defb #44, #53, #46, #4D, #4F, #44, #45, #47, #5B, #4B, #5F; , #5D, #58, #54, #54
;SET_PAL_21       defb #5D, #53, #46, #4D, #4F, #44, #45, #47, #5B, #4B, #5F; , #5D, #58, #54, #54
 SET_PAL_21       defb #5C, #43, #5E, #4D, #4F, #44, #45, #47, #5B, #4B, #5F


; credits THIS
SET_PAL_22       defb 91,76,78,#45,#5B,#4F,#5E,#4E,#4E,#43,#4B; ,&5d,&58,&54,&54  
;
align 256 
;
; MIROR PALETTES for lower scrollers
; only the 3 first colors are used for lower textures
 ;               defs 128,88
;
                defs 11,84
; black PALETTE
MSET_PAL_0		defb 84,84,84,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2     ; black PALETTE
 ;8 BIT LOVE  OK! + mode 1 DARK VIOTET
;MSET_PAL_1		defb &5d,&58,&5f,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2 
 MSET_PAL_1       defb #55, #44, #57, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B

;MSET_PAL_2		defb 67,88,78,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2  
 MSET_PAL_2       defb #4F, #58, #43, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B

;MSET_PAL_3		defb 75,76,78,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2 
 MSET_PAL_3       defb #5F, #5D, #59, #4C, #5C, #4E, #4D, #4A, #5B, #57, #4B


MSET_PAL_4		defb 91,85,75,#5C,#45,#4D,#47,#4F,#5B,#57,#4B 
;
; CREDITS INTRO
MSET_PAL_5		defb 90,69,79,#45,#5B,#47,#5C,#4F,#5E,#43,#4B
; BOEUF
MSET_PAL_6       defb &47,&40,75,#45,#5C,#47,#55,#4C,#4E,#57,#4B ;
;
; ; credits POLAR
MSET_PAL_7       defb 77,&58,&5f,#41,#5B,#59,#43,#5E,#4E,#53,#4B
;
;
; 30 YEARS - OK! + SET 1 mode 1 orange
MSET_PAL_8      defb &47,&4c,&43,&4b,&5f,&5b,&4d,&4f,&55,&57,&40 ;&5d,&58,&44,&54 ; extra datas, stored in the CYCLING TABLE...
; 30 YEARS - OK! + SET 2 mode 1 yellow/green
MSET_PAL_9       defb 64,86,91,&4b,&5f,&5b,&4d,&4f,&55,&57,&40 ;&5d,&58,&44,&54
; 30 YEARS - Ok! + SET 3 mode 1 grey
MSET_PAL_10       defb 76,88,67,&4b,&5f,&5b,&4d,&4f,&55,&57,&40 ;&5d,&58,&44,&54


; HOT BOLD  + orange/red
MSET_PAL_11       defb 64,76,78,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54   

; STATIC DESIRE
MSET_PAL_12       defb 94,76,78,#45,#4D,#4F,#5C,#46,#5B,#57,#4B;  ,&5d,&58,&54,&54    
; GREETS +  ; BAD PALETTE BECAUSE PERMANENT COLORS ARE NOT RESPECTED
MSET_PAL_13       defb &5e,76,78,&4d,&4f,&5f,&45,&55,&47,&5b,&5d; ,&5d,&58,&54,&54  
MSET_PAL_14       defb 69,76,78,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54   
; 
; BND
;MSET_PAL_15       defb 69,76,75,#55,&4d,#4F,#59,#45,#57,#5c,#4B; ,&5d,&58,&54,&54  
MSET_PAL_15       defb #47, #58, #43, #55, #4D, #4F, #59, #45, #57, #5C, #4B

MSET_PAL_16      defb 75,69,67,#57,#55,#4D,#4F,#41,#59,#57,#4B 
; fuel + BND
MSET_PAL_17       defb 88,&5d,&4d,#55,#4D,#4F,#59,#45,#57,#5C,#4B; ,&5d,&58,&54,&54  
; static BND
MSET_PAL_18       defb 92,64,91,#55,#4D,#4F,#59,#45,#57,#5C,#4B; ,&5d,&58,&54,&54   
;
MSET_PAL_19       defb 91,76,78,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54   
; STATIC BND CARRE
MSET_PAL_20       defb 86,89,91,#55,#4D,#4F,#59,#45,#57,#5c,#4B; ,&5d,&58,&54,&54   
; START4
;MSET_PAL_21       defb 69,91,75,&4d,&4f,&44,&45,&47,&5b,&4b,&5f; ,&5d,&58,&54,&54 
;MSET_PAL_21       defb #44, #5F, #5D, #4D, #4F, #44, #45, #47, #5B, #4B, #5F; ,#5D, #58, #54, #54
 MSET_PAL_21       defb #58, #59, #41, #4D, #4F, #44, #45, #47, #5B, #4B, #5F; ,#5D, #58, #54, #54
; credits THIS
MSET_PAL_22       defb 95,76,78,#45,#5B,#4F,#5E,#4E,#4E,#43,#4B  

Full Source

Show Source
;
; 14 NOPS
    ld b,&BD	; 2
	outi        ; 4 b=#bc ;sélection r13
	inc b       ; 1
	inc b       ; 1 b=#be
	outi        ; 4 b=#bd ;envoie val au reg 13
	ld b,&7f	; 2

; ******************************************************************
;
POS6_2

	ld h,6
;
BOUCLE_6
	defs 4,0	
	exx
	out (c),e  ; MODE droite  HCC=4
	exx
;	defs 4,0
	defs 6,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	defs 10,0
	exx
	out (c),d   ; MODE gauche
	exx
	defs 2,0
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3


	repeat 6
	exx
	out (c),e  ; MODE droite  HCC=4
	exx
    defs 10,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	defs 10,0
	exx
	out (c),d   ; MODE gauche
	exx
	defs 2,0
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
;   breakpoint
	out (c),e  ; MODE droite

    ld b,&BD	; 2
    defs 13-3-2,0	
	exx
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
	exx
 
	outi        ; 4 b=#bc ;sélection r13
	inc b       ; 1
	inc b       ; 1 b=#be
	outi        ; 4 b=#bd ;envoie val au reg 13
	ld b,&7f	; 2
	defs 3+2,0
	
	exx	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b 
	RET
;
POS7_2
	ld h,7
	jp BOUCLE_6+3
;	
POS8_2

	ld h,8
	jp BOUCLE_6+3

POS9_2

	ld h,9
	jp BOUCLE_6+3

;
POS10_2

	ld h,10
	jp BOUCLE_6+3

;
POS11_2

	ld h,11
	jp BOUCLE_6+3

POS12_2

	ld h,12
	jp BOUCLE_6+3

;
POS13_2

	ld h,13
	jp BOUCLE_6+3

;
POS14_2

	ld h,14
	jp BOUCLE_6+3

POS15_2

	ld h,15
	jp BOUCLE_6+3

;
POS16_2
	ld h,16
	jp BOUCLE_6+3

;
POS17_2
	ld h,17
	jp BOUCLE_6+3

;
POS18_2
	ld h,18
	jp BOUCLE_6+3

POS19_2
	ld h,19
	jp BOUCLE_20+3
;	
POS20_2
	ld h,20
BOUCLE_20	
	repeat 7
;
	defs 3,0
	exx
	out (c),e ; MODE droite
	exx
	
	defs 6+2-1,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	defs 10-2,0
	exx
	out (c),d   ; MODE gauche
	exx
	defs 2,0
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	defs 4-2,0
	rend

	exx
	out (c),e  ; MODE droite
	ld b,&BD	; 2
    defs 13-3-2,0	
	exx
 
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2

	exx
;	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	defs 3+2,0
	exx
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
	ret
;
POS21_2
	ld h,21
	jp POS30_2+5
;
POS22_2
	ld h,22
	jp POS30_2+5	
;
POS23_2
	ld h,23
	jp POS30_2+5	
;
POS24_2
	ld h,24
	JP POS30_2+5
;
POS25_2
	ld h,25
	JP POS30_2+5
;
POS26_2
	ld h,26
	JP POS30_2+5
;
POS27_2
	ld h,27
	JP POS30_2+5
;
POS28_2
	ld h,28
	JP POS30_2+5
;
POS29_2
	ld h,29
	JP POS30_2+5
;
POS30_2
	ld h,30
;
	repeat 7
;
    defs 10,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 5,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
POS31_2
	ld h,31
; idem 30
	repeat 7
;
    defs 10,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
;	ld a,&e
    nop
    nop
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 5,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
;
POS32_2
	ld h,32
; idem 30
	repeat 7
;
    defs 10,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
	nop
    nop
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 5,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
POS33_2
	ld h,33
	nop
	repeat 7
;
    defs 10,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
	nop
    nop
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 16-9-1-1-2+1,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
;
POS34_2
	ld h,34
; idem 33
	nop
	nop
	repeat 7
;
	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
;	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 16-13+2,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
;
POS35_2
	ld h,35
    JP POS36_2+5
; idem 33
	nop
	nop
	repeat 7
;
	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
;	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 16-13+2,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret	
;
POS36_2
	ld h,36
; 
	nop
	nop
	nop
;	nop
	repeat 7
;
	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
;	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
	defs 16-13+1,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret

POS37_2
	ld h,37
; impossible?
	nop
	nop
	defs 3+3,0
	repeat 6
;
	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12-3,0
	out (c),e   ; envoie valeur R3
	exx
	out (c),d   ; MODE
	exx
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	
	out (c),l   ; envoie valeur R2
	defs 3,0
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
	
;
	rend
;

	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12-3,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
;	defs 16-13,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret
;
POS38_2
	ld h,38

	nop
	nop
	defs 3,0
	repeat 7
;
	defs 4,0
	defs 6,0
	exx
	out (c),e  ; MODE 
	exx
	defs 12-3,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	exx
	out (c),d   ; MODE
	exx 
	out (c),h   ; envoie valeur R2
	dec b
	inc c 
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
	defs 3,0
;
	rend
	exx
	out (c),e  ; MODE droite
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	defs 8+2+2+2,0
	ld bc,&bc03
	out (c),c
	inc b
	ld a,&e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2
;
;	defs 16-13,0
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b ; 22
;	
	ret


BOUCLE
	nop
	nop
	repeat 7
;
	
	exx
	out (c),e  ; MODE droite  HCC=4
	exx
	defs 4,0
	defs 6,0
	out (c),e   ; envoie valeur R3
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie valeur R2
	defs 10,0
	exx
	out (c),d   ; MODE gauche
	exx
	defs 2,0
	out (c),h   ; envoie valeur R2
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie valeur R3
;
	rend
;
	RET


CHANGE_OFFSET
OFFSET
;
	exx
	out (c),e  ; MODE droite
	exx
;	nop
;	ld l,&0e
	out (c),a     ; envoi &e au R3
	dec c
	dec b		
	out (c),c     ; selection R2
	inc b
	out (c),l     ; envoi &32 au R2

	exx
	ld b,&BD	
	outi  ; b=#bc ;sélection r13
	inc b
	inc b ; b=#be
	outi  ; b=#bd ;envoie val au reg 13
	ld b,&7f
	exx
;	
	dec b
	inc c
	out (c),c      ; selection R3
	inc b 

	ret

Full Source

Show Source
INTERLACED equ 0

RASTER0 = 69
PRAST1 = 2
RASTER1 = 77
PRAST2 = 2
RASTER2 = 95
PRAST3 = 2
RASTER3 = 93
;
LOGO_INK0 = 84 ; 68
LOGO_INK3 = 68
TRANSITION_LINE_COLOR = 88 ; 68

; LOGO = 2 * 2 lignes  + 4 * 5 lignes + 1 * 8 lignes 

LOGO_ZONE
;    breakpoint
 
TEMPO1 
  breakpoint

;
;	ld bc,&7f00
;	out (c),c
;	ld a,92
;	out (c),a
; creation d'un écran de transition de 2 lignes
; MODE 0  pour pouvoir changer l'Offset
;
     IF TESTBRK=1
	breakpoint
 endif

	
;	
	ld bc,&7f8d; 8c
	out (c),c
	ld a,2
	out (c),a; PEN 2 selected
;	
	ld hl,&5800+RASTER0   
	out (c),c
	out (c),l
;	defs 16-12,0
	out (c),0
	ld de,(TRANSITION_LINE_COLOR*256)+LOGO_INK0
	out (c),e   ; 0
	ld a,3
	out (c),a
	out (c),d ; transition line
;
	ld a,1
	out (c),a 
    out (c),h


	defs 7,0 
	defs 10-6,0
	


	ld hl,&1130
;	
	ld e,LOGO_INK3

	defs 2,0


    ld bc,&bc09
	out (c),c
	ld bc,&bd01
	out (c),c

;	
	ld bc,&bc00+12
	out (c),c
	inc b
	out (c),h
	inc c
	dec b
;	ld bc,&bc00+13
	out (c),c
	inc b
	out (c),l	
;
   defs 6,0

	ld bc,&7f03
	out (c),c
	out (c),e ; LOGO_INK3
 	defs 16,0
;	 defs 64,0
			
		;		breakpoint
; 61 NOPS				
TRANSFERT_PAL ld hl,SOURCE_PAL
			  ld de,TCOL_MAIN+1
			   repeat 11
				ldi
			   rend	
; HL contains the PALETTE for LOWER MODE 1


	ld de,&1130+48
	ld bc,&bc00+12
	out (c),c
	inc b
	out (c),d
	inc c
	dec b
;	ld bc,&bc00+13
	out (c),c
	inc b
	out (c),e
;


;	defs 109,0


    IF TESTBRK=1
	breakpoint
    endif
; CRTC 0
 IF SELECTED_CRTC = 0;  was 0

AD0 ; = était en AD2 avant
	ld bc,&bc09 
	out (c),c 
	ld bc,&bd00+4
	out (c),c
;
	dec b
;	ld bc,&bc04
	out (c),c
;	ld bc,&bd00+3 ;
	inc b
	dec c
	out (c),c
AD1	
	exx
	ld (STORE_HL+1),hl
	call ROUTINE_TRANSFERT
	exx
AD2	
     ENDIF 

 IF SELECTED_CRTC = 1 ; 111111 ; WAS 1

AD1	
	exx
	ld (STORE_HL+1),hl
	call ROUTINE_TRANSFERT
	exx
AD2   ld bc,&bc09 
	out (c),c 
	ld bc,&bd00+4
	out (c),c
;
	dec b
;	ld bc,&bc04
	out (c),c
;	ld bc,&bd00+3 ;
	inc b
	dec c
	out (c),c
     ENDIF 

; CRTC 0
 IF SELECTED_CRTC = 2

AD0 ; = était en AD2 avant
	ld bc,&bc09 
	out (c),c 
	ld bc,&bd00+4
	out (c),c
;
	dec b
;	ld bc,&bc04
	out (c),c
;	ld bc,&bd00+3 ;
	inc b
	dec c
	out (c),c
AD1	
	exx
	ld (STORE_HL+1),hl
	call ROUTINE_TRANSFERT
	exx
AD2	
     ENDIF 

 IF SELECTED_CRTC = 3

AD1	
	exx
	ld (STORE_HL+1),hl
	call ROUTINE_TRANSFERT
	exx
AD2   ld bc,&bc09 
	out (c),c 
	ld bc,&bd00+4
	out (c),c
;
	dec b
;	ld bc,&bc04
	out (c),c
;	ld bc,&bd00+3 ;
	inc b
	dec c
	out (c),c
;	exx

     ENDIF 

RAST1		ld bc,&7f00+PRAST1
			out (c),c
		 	ld a,RASTER1
			out (c),a
;
		
;
TRANSFERT_LOWER_PALETTE  
; HL contains the PALETTE for LOWER MODE 1
;
			inc h ; go to the mirror table !
;
			ld e,(hl) ; pen 1
			inc l
			ld d,(hl) ; pen 2
;			
			inc l
			ld a,(hl)
			ex de,hl
			ld (POKE_INK1_INK2+1),hl
			ld (POK_INK3_INK0+2),a
;


POK_ROUTINE1	call CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART1

;

RAST2	ld bc,&7f00+PRAST2
	out (c),c
	ld a,RASTER2
	out (c),a
;	defs 6,0

TEMPO2
	ld hl,&1220
;	
	ld bc,&bc00+12
	out (c),c
;	ld bc,&bd00+&12
	inc b
	out (c),h
;
;	ld bc,&bc00+13
	dec b
	inc c
	out (c),c
	inc b
	out (c),l

		defs 28-13,0
 

   breakpoint
POK_ROUTINE2	call CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART2



RAST3	ld bc,&7f00+PRAST3
	out (c),c
	ld a,RASTER3
	out (c),a

  ; IF TESTBRK=1
	breakpoint
 ;  endif
 ;  


 
	ld bc,&bc09
	out (c),c
	ld bc,&bd07
	out (c),c
;
	ld bc,&bc04
	out (c),c
	inc b
	defb &ed,&71
;



;	defs 6,0	

	

POK_ROUTINE3	call CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART3


					ld hl,EXIT
            		ld (POK_EXIT),hl
					defs 6+1,0

POK_POS_OFFSET_AFTER_LOGO	ld hl,&3000
POKE_INK1_INK2      ld de,&4546	
	ld bc,&7f03
	out (c),c
	ld a,TRANSITION_LINE_COLOR ;  RASTER4
	out (c),a
			;		defs 30-1-23,0

					
;POK_POS_OFFSET_AFTER_LOGO	ld hl,&3000
;POKE_INK1_INK2      ld de,&4546	
					ld c,1
					out (c),c
					out (c),e
					inc c
					out (c),c
					out (c),d
							
					ld de,&0207

					ld bc,&bc00+12
					out (c),c
					inc b
					out (c),h
					inc c
					dec b
					out (c),c
					inc b
					out (c),l

        			ld hl,&1d32
;					
					exx
STORE_HL            ld hl,0000
; don't change HL or A between EXX !!!! 
;						
					ld bc,&7f00
					out (c),c
;
; palette of the lower scrollers ink 0/1
POK_INK3_INK0		ld de,&5f54
					out (c),e   ; 0
					ld a,d
MODES_EXIT_LOGO		ld de,&8e8e
					out (c),e
		;	breakpoint 
					ld c,3      ; PEN 3
					out (c),c
					out (c),a   ; 

					exx
;					
					ld a,&0e	
					
		 			ld bc,&bC03
		 	;		ld de,&0207
		 			out (c),c ; REG 3 selected
					INC B
		 			

;
FIN_LOGO	
				   IF TESTBRK=1
	breakpoint
 endif	 
		 			ret
; 18+9+6=33 scrollers 
; 
INIT_NORMAL_CURVES
	LD HL,CALCUL_TABLE_MOVES_SCROLL_PART1
	ld (POK_ROUTINE1+1),hl
	LD HL,CALCUL_TABLE_MOVES_SCROLL_PART2
	ld (POK_ROUTINE2+1),hl
	LD HL,CALCUL_TABLE_MOVES_SCROLL_PART3
	ld (POK_ROUTINE3+1),hl
	ret
INIT_INTERLACED_CURVES
	LD HL,CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART1
	ld (POK_ROUTINE1+1),hl
	LD HL,CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART2
	ld (POK_ROUTINE2+1),hl
	LD HL,CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART3
	ld (POK_ROUTINE3+1),hl
	ret
;	IF INTERLACED=0

CALCUL_TABLE_MOVES_SCROLL_PART1

;
STEP_CURVE equ 1
NB_SCROLL1 equ 18
	
			defs 5,0

			ld b,0
			exx
STORE_TAB_MOVE_1 ld hl,TAB_MOVEX
EACH_VBL1 	ld a,1
			add a,l
			ld l,a
			ld (STORE_TAB_MOVE_1+1),hl		
EACH_LINE1 	ld bc,1

;		
        repeat NB_SCROLL1,i,1

MOVE_HBLI_1{{i}} ; ld hl,TAB_MOVEX-1+STEP_CURVE*{i}
		
		if STATIC = 0
         ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;		
  ;       ld (MOVE_HBLI{{i}}+1),hl
;         
         ld a,(hl)
		exx ; +
;
		
  ;       ld (MOVE_HBLI_1{{i}}+1),hl
;         
;         ld a,(hl)
		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
;
        ld e,(hl)
        inc l
        ld d,(hl)
; 
        ld (TABLE_RET-2+2*{i}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	
	    add hl,bc
	    ld a,(hl)
;
        ld (TABLE+2*{i}-1),a; 3 (+2 pour sauter l'offset de la zone LOGO)
	;    ld (hl),a	
;		ld (ix+0),a 
;	
		exx
        rend
		exx
		ret
;
CALCUL_TABLE_MOVES_SCROLL_PART2

; **************************************************************	
; 6 lignes + 32 =  416 NOPS
NB_SCROLL2 equ 9
;

		defs 42-28,0
		ld b,0
		exx

        repeat NB_SCROLL2,i,1

MOVE_HBL2_{{i}} 
		if STATIC = 0
          ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;		
  ;       ld (MOVE_HBLI{{i}}+1),hl
;         
         ld a,(hl)
	   	exx ; +
		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
;
        ld e,(hl)
        inc l
        ld d,(hl)
; 
        ld (TABLE_RET-2+36+2*{i}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	
	    add hl,bc
	    ld a,(hl)
;
        ld (TABLE+36+2*{i}-1),a ; 3
	;    ld (hl),a	 
;
		exx
        rend
		exx
		ret
;

CALCUL_TABLE_MOVES_SCROLL_PART3
NB_SCROLL3 equ 6

;		defs 29,0
		ld b,0
		exx
        repeat NB_SCROLL3,i,1

MOVE_HBL3_{{i}} if STATIC = 0
          ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;		
  ;       ld (MOVE_HBLI{{i}}+1),hl
;         
         ld a,(hl)
	    	exx ; +
 		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
;
        ld e,(hl)
        inc l
        ld d,(hl)
; 
        ld (TABLE_RET-2+54+2*{i}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	
	    add hl,bc
	    ld a,(hl)
;
        ld (TABLE+54+2*{i}-1),a ; 3
	;    ld (hl),a	 
;
		exx
        rend
		ret			
;

	;	else 
CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART1
	;	breakpoint
STEP_CURVE_I equ 1 ; 2 for courbes entrelacées
;
	;		defs 69,0
;			
NB_SCROLL1_I equ 17


		ld b,0		
		exx
STORE_TAB_MOVE_I1 ld hl,TAB_MOVEXI+10
EACH_VBL_I1 	ld a,1
			add a,l
			ld l,a
			ld (STORE_TAB_MOVE_I1+1),hl		
EACH_LINE_I1 	ld bc,1
		
        repeat NB_SCROLL1_I,i,1

MOVE_HBLI{{i}} 
	; ld hl,TAB_MOVEX-1+STEP_CURVE_I*{i}
	
		if STATIC = 0
          ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;		   
        ld a,(hl)
		exx ; +
;
		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
;
        ld e,(hl)
        inc l
        ld d,(hl)
; 
        ld (TABLE_RET-4+2*2*{i}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	
	    add hl,bc
	    ld a,(hl) 
;
		ld (TABLE+4*{i}-3),a
		exx
        rend
;		exx
		ret


CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART2
; 6 lignes + 32 =  416 NOPS
NB_SCROLL2_I equ 9


;		defs 28,0
		ld b,0

		exx
STORE_TAB_MOVE_I2 ld hl,TAB_MOVEX+56
EACH_VBL_I2 	ld a,1
			add a,l
			ld l,a
			ld (STORE_TAB_MOVE_I2+1),hl		
EACH_LINE_I2 	ld bc,1

        repeat NB_SCROLL2_I,j,1
MOVE_HBLJ{{j}} 
	if STATIC = 0
         ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;         
         ld a,(hl)
	    	exx ; +
 		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
        ld e,(hl)
        inc l
        ld d,(hl)

        ld (TABLE_RET-4+2+2*2*{j}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	    add hl,bc
	    ld a,(hl)
   ;     ld hl,TABLE+2+4*{j}-3 ; 3
;		ld (hl),a	 
		ld (TABLE+2+4*{j}-3),a
		exx
	    rend
		exx
		ret
;
CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART3
NB_SCROLL3_I equ 7

;		defs 34,0
	defs 5,0
		ld b,0
		exx
 ;
        repeat NB_SCROLL3_I,i,1
MOVE_HBLK{{i}} if STATIC = 0
         ld a,c
		 add l
		 ld l,a
		else
	 	defs 3,0
		endif	
;		
         ld a,(hl)
	     exx ; +
 		 ld c,a ; pour la table d'offset
;		 
         add a,a
         ld e,a
         ld d,0
;
        ld hl,TABLE_MOVE
        add hl,de
;
        ld e,(hl)
        inc l
        ld d,(hl)
; 
        ld (TABLE_RET-4+2+36+2*2*{i}),de  ; 4
; offset 
        ld hl,TABLE_PRECAL_OFFSET
	
	    add hl,bc
	    ld a,(hl)
;
     ;   ld hl,TABLE+38+4*{i}-3 ; 3
	 ;   ld (hl),a	 
;
		ld (TABLE+38+4*{i}-3),a
		exx
        rend
		ret			
 
;	endif

Full Source

Show Source
MODE2_MODE2 equ &8e8e
MODE2_MODE1 equ &8e8d
MODE2_MODE0 equ &8e8c
;
MODE1_MODE2 equ &8d8e
MODE1_MODE1 equ &8d8d
MODE1_MODE0 equ &8d8c
; 
MODE0_MODE2 equ &8c8e
MODE0_MODE1 equ &8c8d
MODE0_MODE0 equ &8c8c
;
GFX_M0_CREDITS_INTRO equ BITMAPS+160
GFX_M0_CREDITS_POLAR equ BITMAPS+480+480
GFX_M0_8BITLOVE equ BITMAPS+320
GFX_M2_CREDITS equ BITMAPS+480
GFX_M1_LOGO_BND equ BITMAPS+480+160
GFX_M2_CREDITS_INVERTED equ BITMAPS+480+320
;
; 
;
SOURCE_GFX1_L      equ GFX_M0_CREDITS_INTRO+4
SOURCE_GFX1_R      equ GFX_M2_CREDITS_INVERTED+1
;
SOURCE_GFX2_L      equ GFX_M0_8BITLOVE+6+8
SOURCE_GFX2_R      equ GFX_M2_CREDITS+2
;
SOURCE_GFX3_L      equ GFX_M1_LOGO_BND+13
SOURCE_GFX3_R      equ GFX_M1_LOGO_BND+3

SOURCE_GFX4_R      equ GFX_M0_8BITLOVE
;
SOURCE_GFX5_L      equ GFX_M0_CREDITS_POLAR
SOURCE_GFX5_R      equ GFX_M2_CREDITS_INVERTED+1

DESTINATION1 equ &8000
DESTINATION2 equ &8400
DESTINATION3 equ &C000
DESTINATION4 equ &c400
           align 256
;TAB_SCENARIO
;

MODE2_COL1      equ 77
MODE2_COL2      equ 76
MODE2_COL3      equ 95
MODE2_COL4      equ 85
  
TRANS_L_LENGTH equ 64  
TRANS_R_LENGTH equ 80

TAB_SCENARIO
; BENEDICTION LOGO MODE 1 L+R
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_1P
            DEFW EFFET_TEST2
; 
            defw SOURCE_GFX1_L ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_1P
            DEFW EFFET_TEST2B
; 
            defw SOURCE_GFX1_R-1 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_2P
            DEFW EFFET_TEST2
; line 2 : LEFT zone 
            defw SOURCE_GFX1_L+80
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_2P
            DEFW EFFET_TEST2B
; line 2 : RIGHT zone
            defw SOURCE_GFX1_R+80-1
            defw DESTINATION1+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_3P
            DEFW EFFET_TEST2
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw SOURCE_GFX1_L-1 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_3P
            DEFW EFFET_TEST2B
; line 3 : RIGHT zone
            defw SOURCE_GFX1_R-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_4P
            DEFW EFFET_TEST2
; line 4 : LEFT zone 
            defw SOURCE_GFX1_L+80-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_4P
            DEFW EFFET_TEST2
; line 4 : RIGHT zone
            defw SOURCE_GFX1_R+80-1-1
            defw DESTINATION1+&98+&43+&130
;            
;//////////////////////////////////////////////////////////
; CREDITS INTRO + MODE 2
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TEST
; line 1 : LEFT zone 
            defw SOURCE_GFX5_L ; source
            defw DESTINATION4 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTB
; ; line 1 : R zone 
            defw SOURCE_GFX5_R-1  ; source
            defw DESTINATION4+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TEST
; line 2 : LEFT zone 
            defw SOURCE_GFX5_L+80
            defw DESTINATION4+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTB
; line 2 : RIGHT zone
            defw SOURCE_GFX5_R+80-1
            defw DESTINATION4+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TEST
; line 3 : LEFT zone 
            defw SOURCE_GFX5_L-1 ; source
            defw DESTINATION4+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTB
; line 3 : RIGHT zone
            defw SOURCE_GFX5_R-1-1
            defw DESTINATION4+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TEST 
; line 4 : LEFT zone 
            defw SOURCE_GFX5_L+80-1
            defw DESTINATION4+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TEST
; line 4 : RIGHT zone
            defw SOURCE_GFX5_R+80-1-1 
            defw DESTINATION4+&98+&43+&130
;
; ////////////////////////////////////////////////////////////////////////////
; ; CREDITS POLAR + MODE 2
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TESTM2
; 
            defw GFX_M1_LOGO_BND+13 ; source
            defw DESTINATION3 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTM2B
; 
            defw GFX_M0_8BITLOVE ; source
            defw DESTINATION3+&43+1 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TESTM2
; line 2 : LEFT zone 
            defw GFX_M1_LOGO_BND+13+80
            defw DESTINATION3+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTM2B
; line 2 : RIGHT zone
            defw GFX_M0_8BITLOVE+80
            defw DESTINATION3+&98+&43+1
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TESTM2
; line 3 : LEFT zone 
            defw GFX_M1_LOGO_BND+13-1 ; source
            defw DESTINATION3+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTM2B
; line 3 : RIGHT zone
            defw GFX_M0_8BITLOVE-1
            defw DESTINATION3+&43+&130+1
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_TESTM2
; line 4 : LEFT zone 
            defw GFX_M1_LOGO_BND+13+80-1
            defw DESTINATION3+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_TESTM2
; line 4 : RIGHT zone
            defw GFX_M0_8BITLOVE+80-1
            defw DESTINATION3+&98+&43+&130+1
;            
;//////////////////////////////////////////////////////////
;
; visible &c000

            defb TRANS_L_LENGTH 
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0_B
; 
            defw SOURCE_GFX3_L ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0
; 
            defw SOURCE_GFX3_R-1 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0
; line 2 : LEFT zone 
            defw SOURCE_GFX3_L+80
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0_B
; line 2 : RIGHT zone
            defw SOURCE_GFX3_R+80-1
            defw DESTINATION1+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0
; line 3 : LEFT zone 
            defw SOURCE_GFX3_L-1 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_1P
            DEFW EFFET_TESTM1M0_B
; line 3 : RIGHT zone
            defw SOURCE_GFX3_R-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_4P
            DEFW EFFET_TESTM1M0
; line 4 : LEFT zone 
            defw SOURCE_GFX3_L+80-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_4P
            DEFW EFFET_TESTM1M0_B
; line 4 : RIGHT zone
            defw SOURCE_GFX3_R+80-1-1
            defw DESTINATION1+&98+&43+&130


;
            defb 0

;

; a whole band is generated by 8 transferts 
;
            defb 64
            defb 84
            DEFW EFFET1
; line 1 : LEFT zone 
            defw SOURCE_GFX1_L ; source
            defw DESTINATION1 ; destination
;           
            defb 96
            defb 84
            DEFW EFFET1
; line 1 : RIGHT zone
            defw SOURCE_GFX1_R
            defw DESTINATION1+&44
;            
            defb 64
            defb 84
            DEFW EFFET1_A
; line 2 : LEFT zone 
            defw SOURCE_GFX1_L+80
            defw DESTINATION1+&98
;         
            defb 96
            defb 79
            DEFW EFFET1_B
; line 2 : RIGHT zone
            defw SOURCE_GFX1_R+80
            defw DESTINATION1+&98+&44
;
            defb 64
            defb 67
            DEFW EFFET1_B
; line 3 : LEFT zone 
            defw SOURCE_GFX1_L ; source
            defw DESTINATION1+&131 ; destination
;           
            defb 96
            defb 78
            DEFW EFFET1
; line 3 : RIGHT zone
            defw SOURCE_GFX1_R
            defw DESTINATION1+&44+&131
;            
            defb 64
            defb 75
            DEFW EFFET1
; line 4 : LEFT zone 
            defw SOURCE_GFX1_L+80
            defw DESTINATION1+&98+&131
;         
            defb 96
            defb 91
            DEFW EFFET1
; line 4 : RIGHT zone
            defw SOURCE_GFX1_R+80
            defw DESTINATION1+&98+&44+&131
;
;           defb 0
; ****************************************************************
; SEQUENCE 2  
;
            defb 64
            defb 85
            DEFW EFFET2
; line 1 : LEFT zone 
            defw SOURCE_GFX2_L ; source
            defw DESTINATION2 ; destination
;           
            defb 96
            defb 79
            DEFW EFFET2
; line 1 : RIGHT zone
            defw SOURCE_GFX2_R
            defw DESTINATION2+&44          
     
            defb 64
            defb 75
            DEFW EFFET2
; line 2 : LEFT zone 
            defw SOURCE_GFX2_L+80
            defw DESTINATION2+&98
;   
            defb 96
            defb 91
            DEFW EFFET2
; line 2 : RIGHT zone
            defw SOURCE_GFX2_R+80
            defw DESTINATION2+&98+&44 
;                 
            defb 64
            defb 82
            DEFW EFFET2
; line 3 : LEFT zone 
            defw SOURCE_GFX2_L ; source
            defw DESTINATION2+&131 ; destination
;                       
            defb 96
            defb 78
            DEFW EFFET1
; line 3 : RIGHT zone
            defw SOURCE_GFX2_R
            defw DESTINATION2+&44+&131
;         
            defb 64
            defb 75
            DEFW EFFET1_A
; line 4 : LEFT zone 
            defw SOURCE_GFX2_L+80
            defw DESTINATION2+&98+&131
;         
            defb 96
            defb 91
            DEFW EFFET1_B
; line 4 : RIGHT zone
            defw SOURCE_GFX2_R+80
            defw DESTINATION2+&98+&44+&131
;            
            defb 255
            defb 67
            DEFW EFFET3
;            
            defw DESTINATION1
            defw DESTINATION1
;   
            defb 255
            defb 76
            DEFW EFFET3_A
;            
            defw SOURCE_GFX1_R
            defw SOURCE_GFX1_R
;   
            defb 255
            defb 76
            DEFW EFFET3_B
;            
            defw SOURCE_GFX1_R
            defw SOURCE_GFX1_R            
            defb 0 ; end of scenario 

    read "effets_scenario.asm"

Full Source

Show Source
MODE2_MODE2 equ &8e8e
MODE2_MODE1 equ &8e8d
MODE2_MODE0 equ &8e8c
;
MODE1_MODE2 equ &8d8e
MODE1_MODE1 equ &8d8d
MODE1_MODE0 equ &8d8c
; 
MODE0_MODE2 equ &8c8e
MODE0_MODE1 equ &8c8d
MODE0_MODE0 equ &8c8c
; BANK &C4
GFX_BNDCP5  equ BITMAPS
GFX_BNDM0_1                  equ BITMAPS 
GFX_BNDM0_2                  equ BITMAPS+80
;
GFX_M0_CREDITS_INTRO    equ BITMAPS ; +160  ; FAKE VALUE!!!!!
GFX_M0_HOTBOLD            equ BITMAPS+160
;
GFX_M0_8BITLOVE             equ BITMAPS+320
;
GFX_DESIRE1               equ BITMAPS+480
GFX_OLDBITS1                  equ BITMAPS+480+80
GFX_DESIRE2             equ BITMAPS+480+160
GFX_OLDBITS2                 equ BITMAPS+480+240
GFX_M1_STILL1              equ BITMAPS+480+320
GFX_M2_BENEDICTION1      equ BITMAPS+480+320+80
;
GFX_M2_CREDITS_INVERTED1    equ 0000 ; *****
GFX_M2_CREDITS_INVERTED2    equ 000
;
GFX_M1_STILL2               equ BITMAPS+480+320+160
GFX_M2_BENEDICTION2       equ BITMAPS+480+320+160+80 
GFX_M0_30YEARS              equ BITMAPS+480+640


GFX_CYCLINGL1               equ BITMAPS+480+640+160
GFX_CYCLINGL2               equ BITMAPS+480+640+160+80
GFX_CYCLINGL3               equ BITMAPS+480+640+160+160
GFX_CYCLINGL4               equ BITMAPS+480+640+160+240

GFX_BNDM2_LEFT1              equ BITMAPS+480+640+160
GFX_BNDM2_LEFT2              equ BITMAPS+480+640+160+80
GFX_FOREVER1               equ BITMAPS+480+640+160+160
GFX_FOREVER2              equ BITMAPS+480+640+160+240
;
STATIC_STILL1       equ BITMAPS+480+640+160+240+80
STATIC_STILL2       equ BITMAPS+480+640+160+240+80+80
STATIC_STILL3      equ BITMAPS+480+640+160+240+80+80+80
STATIC_STILL4       equ BITMAPS+480+640+160+240+80+80+80+80
;
LAST_LINE        equ BITMAPS+640+640+320+80+160+80
;
; BANK &C5
; bank22.scr
;
GFX_M2_CREDITS_INT1_C5     equ BITMAPS+1 ; MODE 0
GFX_CREDINT1                    equ BITMAPS+80+4
GFX_M2_CREDITS_INT2_C5    equ BITMAPS+160+1  ; MODE 0
GFX_CREDINT2                   equ BITMAPS+80+160+4
GFX_M2_CREDITS_POL1_C5               equ BITMAPS+320 ; MODE 0
GFX_CREDPOL1                    equ BITMAPS+320+80+4
GFX_M2_CREDITS_POL2_C5                 equ BITMAPS+320+160  ; MODE 0
GFX_CREDPOL2                   equ BITMAPS+320+80+160+4
GFX_M2_BND1                     equ BITMAPS+640  ; benediction Mode 2
GFX_CREDTHIS1                  equ BITMAPS+640+80  ; ; MODE 0
GFX_M2_BND2                     equ BITMAPS+640+160  ; benediction Mode 2
GFX_CREDTHIS2                  equ BITMAPS+640+160+80 ; 
;
GFX_STATIC1                     equ  BITMAPS+640+320 
GFX_STATIC2                     equ  BITMAPS+640+320+80
GFX_STATIC3                     equ BITMAPS+640+320+160
GFX_STATIC4                     equ BITMAPS+640+320+240
;       
GFX_STATIC5                         equ BITMAPS+640+640
GFX_STATIC6                         equ BITMAPS+640+640+80
GFX_STATIC7              equ BITMAPS+640+640+160
GFX_STATIC8              equ BITMAPS+640+640+240
;
GFX_GREETS1  equ BITMAPS+640+640+320 ; *****
GFX_GREETS2  equ BITMAPS+640+640+320 ; *****
GFX_SPACEM1_1            equ BITMAPS+640+640+320 ; *****

HUGSM2_1                   equ BITMAPS+640+640+320

GFX_SPACEM2_1             equ BITMAPS+640+640+320+80 ; ****
GFX_GREETS160_1               equ BITMAPS+640+640+320+80

HUGSM2_2                   equ BITMAPS+640+640+320+160
GFX_GREETS160_2               equ BITMAPS+640+640+320+80+160
;

; BANK &C7
GFX_M1_LOGO_BND1 equ BITMAPS ; *******
GFX_M1_LOGO_BND2 equ BITMAPS ; *******
GFX_WECODEM1_1     equ BITMAPS ; MODE 1
GFX_WECODEM1_2     equ BITMAPS+80
GFX_SPACE1         equ BITMAPS+160
GFX_BOEUF1          equ BITMAPS+160+80
GFX_SPACE2         equ BITMAPS+160+160
GFX_BOEUF2         equ BITMAPS+160+160+80
GFX_FEED1           equ BITMAPS+160+160+160 
GFX_FEED2           equ BITMAPS+160+160+160+80

GFX_C7_BND_M2_1  equ BITMAPS+640

GFX_C7_BND_M2_2  equ BITMAPS+640+160 
;


SOURCE_GFX1_L      equ GFX_M0_CREDITS_INTRO+4
;SOURCE_GFX1_R1      equ GFX_M2_CREDITS_INVERTED1+1
;SOURCE_GFX1_R2      equ GFX_M2_CREDITS_INVERTED2+1
;
;SOURCE_GFX2_L      equ GFX_M0_8BITLOVE+6+8
;SOURCE_GFX2_R      equ GFX_M2_CREDITS+2
;
;SOURCE_GFX3_L      equ GFX_M1_LOGO_BND1+13
SOURCE_GFX3_R      equ GFX_BNDCP5   

SOURCE_GFX4_R      equ GFX_M0_8BITLOVE
;
;SOURCE_GFX5_L1      equ GFX_M0_CREDITS_POLAR1+4
;SOURCE_GFX5_L2      equ GFX_M0_CREDITS_POLAR2+4
SOURCE_GFX5_R1      equ GFX_M2_CREDITS_INVERTED1+1
SOURCE_GFX5_R2      equ GFX_M2_CREDITS_INVERTED2+1
;


DESTINATION1 equ &8000
DESTINATION2 equ &8400
DESTINATION3 equ &C000
DESTINATION4 equ &c400
           align 256
;TAB_SCENARIO
;

MODE2_COL1      equ 77
MODE2_COL2      equ 76
MODE2_COL3      equ 95
MODE2_COL4      equ 85
  
TRANS_L_LENGTH equ 34 
TRANS_R_LENGTH equ 41
extra_duration equ 42
;
            align 256
TAB_SCENARIO
 ; displays: BENEDICTION LOGO MODE 1 L+R
 ; tranfert: 

            defb 48 ; 64
            defb SET_PAL_3P
            DEFW EFFET_EMPTY_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1 ; destination

            defb 48 ; 64
            defb SET_PAL_0P
            DEFW EFFET_EMPTY_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1 ; destination

;

; real start
; displays: BENEDICTION LOGO MODE 1 L+R
; tranfert: 
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_21P
            DEFW EFFET_START1
; line 2 : LEFT zone 
            defw GFX_CREDINT1 
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_21P
            DEFW EFFET_START1
; line 2 : RIGHT zone
            defw GFX_CREDINT1 
            defw DESTINATION1+&98+&43

EXTRA1
            defb extra_duration+5
            defb SET_PAL_21P
            DEFW EFFET_START1
            defw GFX_CREDINT1 
            defw DESTINATION1+&98+&43

; //////


            defb TRANS_L_LENGTH
            defb SET_PAL_21P
            DEFW EFFET_START5
;
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_21P
            DEFW EFFET_START5
; line 3 : RIGHT zone
            defw GFX_CREDINT1 
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_21P
            DEFW EFFET_START5
; line 4 : LEFT zone 
            defw GFX_CREDINT1 
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_21P
            DEFW EFFET_START5
; line 4 : RIGHT zone
            defw GFX_CREDINT1 
            defw DESTINATION1+&98+&43+&130
;
; ////////
EXTRA2
            defb extra_duration-5
            defb SET_PAL_21P
            DEFW EFFET_START5
            defw GFX_CREDINT1 
            defw DESTINATION1+&98+&43+&130
;


TAB_SCENARIO_REAL_START

; 30 Years
;
           defb TRANS_L_LENGTH ; 64
           defb SET_PAL_21P
            DEFW EFFET_START5
            defw GFX_BNDM2_LEFT1+4  ; source+++++++++++++++++++++++++++++++++++++++
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH ; 80
        ;    defb SET_PAL_8P
        ;    DEFW EFFET_STILL
             defb SET_PAL_21P
            DEFW EFFET_START5
; 
            defw GFX_M0_30YEARS+7-6 ; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
          ;  defb SET_PAL_8P
          ;  DEFW EFFET_STILL
           defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES2

; line 2 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
          ;  defb SET_PAL_9P
          ;  DEFW EFFET_STILL
           defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES2
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80
            defw DESTINATION2+&98+&43

;
EXTRA5 
            defb extra_duration
          ;  defb SET_PAL_9P
          ;  DEFW EFFET_STILL
           defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES2
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80
            defw DESTINATION2+&98+&43
;            
;
            defb TRANS_L_LENGTH 
          ;  defb SET_PAL_9P
          ;  DEFW EFFET_STILL
            defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES2
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_BNDM2_LEFT1+4-1 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
         ;   defb SET_PAL_9P
         ;   DEFW EFFET_STILL
             defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES2
; line 3 : RIGHT zone
            defw GFX_M0_30YEARS+7-6-1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
    
          defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES
; line 4 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4-1
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH

           defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80-1
            defw DESTINATION2+&98+&43+&130
;            
EXTRA6

              defb extra_duration
  
           defb SET_PAL_21P
            DEFW EFFET_START4_BNDCP_MOVES
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80-1
            defw DESTINATION2+&98+&43+&130


;//////////////////////////////////////////////////////////
; displays: BENEDICTION LOGO MODE 1 L+R
; copy: 30 YEARS M0 / STILL INNOVATING
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_9P
            DEFW EFFET_BND30Y
; 
            defw GFX_M0_30YEARS+11  ; source
            defw DESTINATION4 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_9P
            DEFW EFFET_BND30Y
; 
            defw GFX_M1_STILL1+1 ;
            defw DESTINATION4+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_9P
            DEFW EFFET_BND30Y
; line 2 : LEFT zone 
            defw GFX_M0_30YEARS+11+80
            defw DESTINATION4+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_9P
            DEFW EFFET_BND30Y
; line 2 : RIGHT zone
            defw GFX_M1_STILL2+1 ; 
            defw DESTINATION4+&98+&43
;
EXTRA3
            defb extra_duration
            defb SET_PAL_9P
            DEFW EFFET_BND30Y

            defw GFX_M1_STILL2+1 ;
            defw DESTINATION4+&98+&43
;
; ////////
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_10P
            DEFW EFFET_BND30Y2
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_M0_30YEARS+11-1 ; source
            defw DESTINATION4+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_10P
            DEFW EFFET_BND30Y2
; line 3 : RIGHT zone
            defw GFX_M1_STILL1+1-1 
            defw DESTINATION4+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_10P
            DEFW EFFET_BND30Y2
; line 4 : LEFT zone 
            defw GFX_M0_30YEARS+11+80-1
            defw DESTINATION4+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_10P
            DEFW EFFET_BND30Y2
; line 4 : RIGHT zone
            defw GFX_M1_STILL2+1-1 
            defw DESTINATION4+&98+&43+&130
;     

EXTRA4 
            defb extra_duration
            defb SET_PAL_10P
            DEFW EFFET_BND30Y2
; line 4 : RIGHT zone
            defw GFX_M1_STILL2+1-1 
            defw DESTINATION4+&98+&43+&130


;//////////////////////////////////////////////////////////
; displays: 30 YEARS M0 / STILL INNOVATING
; copy:  BND mode 2 / 30 YEARS M0 
 


;////////////////////////////////////////////////////////////////////////////
; 30 YEARS --------------------------------------------------------
; displays: 30 Y / STILL mode 1 **** BND mode 2/ 30 Y

            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_16P
            DEFW EFFET_STILL
; 
            defw GFX_BNDM0_1+8; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_16P
            DEFW EFFET_STILL
; 
            defw GFX_OLDBITS1 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 2 : LEFT zone 
            defw GFX_BNDM0_2+8
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 2 : RIGHT zone
            defw GFX_OLDBITS2
            defw DESTINATION1+&98+&43
;
EXTRA7
          defb extra_duration
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 2 : RIGHT zone
            defw GFX_OLDBITS2
            defw DESTINATION1+&98+&43
; ////
            defb TRANS_L_LENGTH 
            defb SET_PAL_16P
            DEFW EFFET_STILL
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_BNDM0_1+8-1; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 3 : RIGHT zone
            defw GFX_OLDBITS1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 4 : LEFT zone 
            defw GFX_BNDM0_2+8-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 4 : RIGHT zone
            defw GFX_OLDBITS2-1
            defw DESTINATION1+&98+&43+&130

EXTRA8
                defb extra_duration
            defb SET_PAL_16P
            DEFW EFFET_STILL
; line 4 : RIGHT zone
            defw GFX_OLDBITS2-1
            defw DESTINATION1+&98+&43+&130

;
;//////////////////////////////////////////////////////////
; displays: MODE 0 30YEARS + MODE 1 Old Bits 
; transfert CREDITS POLAR + MODE 2
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 1 : LEFT zone 
            defw GFX_M0_30YEARS+11 ; source
            defw DESTINATION4 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; ; line 1 : R zone 
            defw GFX_M2_BENEDICTION1  ; source
            defw DESTINATION4+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 2 : LEFT zone 
            defw GFX_M0_30YEARS+11+80
            defw DESTINATION4+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 2 : RIGHT zone
            defw GFX_M2_BENEDICTION2
            defw DESTINATION4+&98+&43

EXTRA9
            defb extra_duration
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 2 : RIGHT zone
            defw GFX_M2_BENEDICTION2
            defw DESTINATION4+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 3 : LEFT zone 
            defw GFX_M0_30YEARS+11-1 ; source
            defw DESTINATION4+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 3 : RIGHT zone
            defw GFX_M2_BENEDICTION1-1
            defw DESTINATION4+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 4 : LEFT zone 
            defw GFX_M0_30YEARS+11+80-1
            defw DESTINATION4+&98+&130 
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 4 : RIGHT zone
            defw GFX_M2_BENEDICTION2-1 
            defw DESTINATION4+&98+&43+&130

EXTRA10
            defb extra_duration
            defb SET_PAL_15P
            DEFW EFFET_OLDBITS
; line 4 : RIGHT zone
            defw GFX_M2_BENEDICTION2-1 
            defw DESTINATION4+&98+&43+&130

;TAB_SCENARIO
; displays: CREDITS POLAR + MODE 2
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_10P 
            DEFW EFFET_30Y_CROSS
; 
            defw GFX_FOREVER1+10 ; source
            defw DESTINATION1 ; destination
;
;
            defb TRANS_R_LENGTH
            defb SET_PAL_10P
            DEFW EFFET_30Y_CROSS
; 
            defw GFX_M0_8BITLOVE ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_10P
            DEFW EFFET_30Y_CROSS
; line 2 : LEFT zone 
            defw GFX_FOREVER2+10
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_9P
            DEFW EFFET_30Y_CROSS
; line 2 : RIGHT zone
            defw GFX_M0_8BITLOVE+80
            defw DESTINATION1+&98+&43
;
EXTRA11
            defb extra_duration
            defb SET_PAL_9P
            DEFW EFFET_30Y_CROSS
; line 2 : RIGHT zone
            defw GFX_M0_8BITLOVE+80
            defw DESTINATION1+&98+&43

; /////
            defb TRANS_L_LENGTH 
            defb SET_PAL_9P
            DEFW EFFET_30Y_CROSS
; line 3 : LEFT zone  
            defw GFX_FOREVER1+10-1 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_9P
            DEFW EFFET_30Y_CROSS
; line 3 : RIGHT zone
            defw GFX_M0_8BITLOVE-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_8P
            DEFW EFFET_30Y_CROSS
; line 4 : LEFT zone 
            defw GFX_FOREVER2+10-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_8P
            DEFW EFFET_30Y_CROSS
; line 4 : RIGHT zone
            defw GFX_M0_8BITLOVE+80-1
            defw DESTINATION1+&98+&43+&130
;   
EXTRA12
            defb extra_duration
            defb SET_PAL_8P
            DEFW EFFET_30Y_CROSS
; line 4 : RIGHT zone
            defw GFX_M0_8BITLOVE+80-1
            defw DESTINATION1+&98+&43+&130


;//////////////////////////////////////////////////////////
; tranfert BND STATIC / We code Mode 1
; visible 8BITS 

            defb TRANS_L_LENGTH 
            defb SET_PAL_1P
            DEFW EFFET_8BITS_SWITCH_C7
; 
            defw GFX_STATIC5+1 ; source
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_1P
            DEFW EFFET_8BITS
; 
            defw GFX_WECODEM1_1+1; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_1P
            DEFW EFFET_8BITS
; line 2 : LEFT zone 
            defw GFX_STATIC6+1
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_1P
            DEFW EFFET_8BITS2
; line 2 : RIGHT zone
            defw GFX_WECODEM1_2+1
            defw DESTINATION2+&98+&43
EXTRA13
            defb extra_duration
            defb SET_PAL_1P
            DEFW EFFET_8BITS2
; line 2 : RIGHT zone
            defw GFX_WECODEM1_2+1
            defw DESTINATION2+&98+&43
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_3P
            DEFW EFFET_8BITS2
; line 3 : LEFT zone 
            defw GFX_STATIC7+1 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_3P
            DEFW EFFET_8BITS2
; line 3 : RIGHT zone
            defw GFX_WECODEM1_1-1+1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_3P
            DEFW EFFET_8BITS3INT
; line 4 : LEFT zone 
            defw GFX_STATIC8+1
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_3P
            DEFW EFFET_8BITS3INT
; line 4 : RIGHT zone
            defw GFX_WECODEM1_2-1+1
            defw DESTINATION2+&98+&43+&130
 
EXTRA14
            defb extra_duration
            defb SET_PAL_3P
            DEFW EFFET_8BITS3INT
            defw GFX_WECODEM1_2-1+1
            defw DESTINATION2+&98+&43+&130


;TAB_SCENARIO            
;
; CCCCCCCCCCCCYYYYYYYYYYYYYYYYCCCCCCCCCCCCCCCCCLLLLLLLLLLLLLLLLLIIIIIIIIIIIIIIIIIIIIIIGGGGGGGGGGGGGGGGG
; displays: BND STATIC M0 + we code mode 1
; copy:  L= BND STATIC               R= space inv 2 
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; 
            defw GFX_STATIC5  ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; 
            defw GFX_SPACE1-1  ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; line 2 : LEFT zone 
            defw GFX_STATIC6
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE
; line 2 : RIGHT zone
            defw GFX_SPACE2-1
            defw DESTINATION1+&98+&43
EXTRA15
          defb extra_duration
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE
; line 2 : RIGHT zone
            defw GFX_SPACE2-1
            defw DESTINATION1+&98+&43

            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_STATIC7 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE
; line 3 : RIGHT zone
            defw GFX_SPACE1-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; line 4 : LEFT zone 
            defw GFX_STATIC8
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; line 4 : RIGHT zone
            defw GFX_SPACE2-1-1
            defw DESTINATION1+&98+&43+&130    
;            
EXTRA16
            defb extra_duration
            defb SET_PAL_20P
            DEFW EFFET_STATIC_WECODE1
; line 4 : RIGHT zone
            defw GFX_SPACE2-1-1
            defw DESTINATION1+&98+&43+&130   


 ; displays: BND LOGO MODE 1 + CYCLING
 ; copy:  L=               R= CYCLING2 MODE 1

            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; 
            defw GFX_BNDM0_1+8; source
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; 
            defw STATIC_STILL1 ; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH  
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 2 : LEFT zone 
            defw GFX_BNDM0_2+8
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 2 : RIGHT zone
            defw STATIC_STILL2
            defw DESTINATION2+&98+&43

EXTRA17             
            defb extra_duration
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 2 : RIGHT zone
            defw STATIC_STILL2
            defw DESTINATION2+&98+&43
; /////////////////////////////////////////////
            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 3 : LEFT zone 
            defw GFX_BNDM0_1+8-1 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 3 : RIGHT zone
            defw STATIC_STILL3
            defw DESTINATION2+&43+&130 
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 4 : LEFT zone 
            defw GFX_BNDM0_2+8-1
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 4 : RIGHT zone
            defw STATIC_STILL4
            defw DESTINATION2+&98+&43+&130

EXTRA18
            defb extra_duration
            defb SET_PAL_20P
            DEFW EFFET_SPACE1
; line 4 : RIGHT zone
            defw STATIC_STILL4
            defw DESTINATION2+&98+&43+&130
;
; TAB_SCENARIO
 ; displays: BND LOGO MODE 1 + CYCLING
 ; copy:  L=  BND             R= BND CODING PARTY 

            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL
; 
            defw GFX_BNDM2_LEFT1+4 ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL
; 
            defw GFX_M0_HOTBOLD-1 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH  
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL
; line 2 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL
; line 2 : RIGHT zone
            defw GFX_M0_HOTBOLD+80-1
            defw DESTINATION1+&98+&43
EXTRA19
            defb extra_duration
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL
            defw GFX_M0_HOTBOLD+80-1
            defw DESTINATION1+&98+&43
; ///////////////////////////////////////////////
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL1
; line 3 : LEFT zone 
            defw GFX_BNDM2_LEFT1+4-1 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL1
; line 3 : RIGHT zone
            defw GFX_M0_HOTBOLD-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL1
; line 4 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_15P
            DEFW EFFET_STATIC_STILL1
; line 4 : RIGHT zone
            defw GFX_M0_HOTBOLD+80-1-1
            defw DESTINATION1+&98+&43+&130    

EXTRA20       
            defb extra_duration
            defb SET_PAL_15P
            defw EFFET_STATIC_STILL
; line 4 : RIGHT zone
            defw GFX_M0_HOTBOLD+80-1-1
            defw DESTINATION1+&98+&43+&130   
;
; displays M1 BND / M0 HOLD BOLD 
; copy:  L=  BND             R= BND CODING PARTY 

            defb TRANS_L_LENGTH 
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD
; 
            defw GFX_BNDM2_LEFT1+2  ; source
            defw DESTINATION3 ; destination
;
            defb TRANS_R_LENGTH
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD
; 
            defw GFX_DESIRE1+1 ; source
            defw DESTINATION3+&43 ; destination
;         
            defb TRANS_L_LENGTH  
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD
; line 2 : LEFT zone 
            defw GFX_BNDM2_LEFT2+2
            defw DESTINATION3+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD
; line 2 : RIGHT zone
            defw GFX_DESIRE2+1
            defw DESTINATION3+&98+&43
;
EXTRA21
            defb extra_duration
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD
; line 2 : RIGHT zone
            defw GFX_DESIRE2+1 
            defw DESTINATION3+&98+&43


            defb TRANS_L_LENGTH 
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD2
; line 3 : LEFT zone 
            defw GFX_BNDM2_LEFT1+2-1  ; source
            defw DESTINATION3+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD2
; line 3 : RIGHT zone
            defw GFX_DESIRE1+1-1
            defw DESTINATION3+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD2
; line 4 : LEFT zone 
            defw GFX_BNDM2_LEFT2+2-1
            defw DESTINATION3+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD2
; line 4 : RIGHT zone
            defw GFX_DESIRE2+1-1 
            defw DESTINATION3+&98+&43+&130    
; 

EXTRA22 
             defb extra_duration
            defb SET_PAL_11P
            DEFW EFFET_HOTBOLD2
; line 4 : RIGHT zone
            defw GFX_DESIRE2+1-1
            defw DESTINATION3+&98+&43+&130    
;
;
; SWITCH BANK - SWITCH BANK - SWITCH BANK - SWITCH BANK - SWITCH BANK - SWITCH BANK - SWITCH BANK
; displays:  MODE 2 + DESIRE TO FIRE 
; transfert GREETS MO + BND MODE 2
;
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; 
            defw GFX_STATIC1; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; 
            defw GFX_M2_BND1-1 ; source
            defw DESTINATION1+&43 ; destination
;          
            defb TRANS_L_LENGTH 
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 2 : LEFT zone 
            defw GFX_STATIC2
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 2 : RIG
            defw GFX_M2_BND2-1
            defw DESTINATION1+&98+&43


EXTRA23            
            defb extra_duration
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 2 : RIGHT zone
            defw GFX_M2_BND2-1
            defw DESTINATION1+&98+&43



;
            defb TRANS_L_LENGTH 
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_STATIC3 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 3 : RIGHT zone
            defw GFX_M2_BND1-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 4 : LEFT zone 
            defw GFX_STATIC4
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 4 : RIGHT zone
            defw GFX_M2_BND2-1-1
            defw DESTINATION1+&98+&43+&130
EXTRA24
            defb extra_duration
            defb SET_PAL_4P
            DEFW EFFET_SWITCH_BANK_C5
; line 4 : RIGHT zone
            defw GFX_M2_BND2-1-1 
            defw DESTINATION1+&98+&43+&130            
;            
; -------------------------------------------------------------------------------------           
; Displays: GREETS MO + BND MODE 2
; Transfet FEED Mode 1 + TEXTURE BOEUF Mode 0
;
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE_SWITCH_C7
; 
            defw GFX_FEED1+1+3  ; source
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; 
            defw GFX_BOEUF1  ; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 2 : LEFT zone 
            defw GFX_FEED2+1+3
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 2 : RIGHT zone
            defw GFX_BOEUF2
            defw DESTINATION2+&98+&43
;
EXTRA25
            defb extra_duration
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 2 : RIGHT zone
            defw GFX_BOEUF2
            defw DESTINATION2+&98+&43


            defb TRANS_L_LENGTH 
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_FEED1+1-1+3 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 3 : RIGHT zone
            defw GFX_BOEUF1-1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 4 : LEFT zone 
            defw GFX_FEED2+1-1+3
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 4 : RIGHT zone
            defw GFX_BOEUF2-1
            defw DESTINATION2+&98+&43+&130;
;
EXTRA26            
            defb extra_duration
            defb SET_PAL_12P
            DEFW EFFET_STATIC_DESIRE
; line 4 : RIGHT zone
            defw GFX_BOEUF2-1
            defw DESTINATION2+&98+&43+&130;

; -------------------------------------------------------------------------------------------------
; Displays: CREDITS POLAR + MODE 2
; transfert BNDM2 + WECODE MODE 1
;
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_6P
            DEFW EFFET_BOEUF_SWITCHC5
; 
            defw HUGSM2_1+10 ; source
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_6P
            DEFW EFFET_BOEUF_SWITCHC5
; 
            defw GFX_GREETS160_1-1 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_6P
            DEFW EFFET_BOEUF_SWITCHC5
; line 2 : LEFT zone 
            defw HUGSM2_2+10
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_6P
            DEFW EFFET_BOEUF_SWITCHC5
; line 2 : RIGHT zone
            defw GFX_GREETS160_2-1
            defw DESTINATION1+&98+&43
;
EXTRA27
            defb extra_duration
            defb SET_PAL_6P
            DEFW EFFET_BOEUF_SWITCHC5
; line 2 : RIGHT zone
            defw GFX_GREETS160_2-1
            defw DESTINATION1+&98+&43


            defb TRANS_L_LENGTH 
            defb SET_PAL_6P
            DEFW EFFET_BOEUF
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw HUGSM2_1+10-1 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_6P
            DEFW EFFET_BOEUF
; line 3 : RIGHT zone
            defw  GFX_GREETS160_1-1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_6P
            DEFW EFFET_BOEUF
; line 4 : LEFT zone 
            defw HUGSM2_2+10-1
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_6P
            DEFW EFFET_BOEUF
; line 4 : RIGHT zone
            defw GFX_GREETS160_2-1-1
            defw DESTINATION1+&98+&43+&130
;
EXTRA28
            defb extra_duration
            defb SET_PAL_6P
            DEFW EFFET_BOEUF
; line 4 : RIGHT zone
            defw GFX_GREETS160_2-1-1
            defw DESTINATION1+&98+&43+&130

      
; -------------------------------------------------------------------------------------           
; Displays:  hugs mode 2 + GREET mode 0
; Transfert STATIC BND / Hugs Mode 2
;
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_13P 
            DEFW EFFET_GREETR
; 
            defw GFX_STATIC5 ; source
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_13P
            DEFW EFFET_GREETR
; 
            defw HUGSM2_1+7-6; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_13P
            DEFW EFFET_GREETR
; line 2 : LEFT zone 
            defw GFX_STATIC6
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_14P
            DEFW EFFET_GREETR
; line 2 : RIGHT zone
            defw HUGSM2_2+7-6
            defw DESTINATION2+&98+&43

EXTRA29
            defb extra_duration
            defb SET_PAL_14P
            DEFW EFFET_GREETR
; line 2 : RIGHT zone
            defw HUGSM2_2+7-6
            defw DESTINATION2+&98+&43

;
            defb TRANS_L_LENGTH 
            defb SET_PAL_14P
            DEFW EFFET_GREETR2
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_STATIC7; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_14P
            DEFW EFFET_GREETR2
; line 3 : RIGHT zone
            defw HUGSM2_1+7-6-1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_13P
            DEFW EFFET_GREETR2
; line 4 : LEFT zone 
            defw GFX_STATIC8
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH 
            defb SET_PAL_13P
            DEFW EFFET_GREETR2
; line 4 : RIGHT zone
            defw HUGSM2_2+7-6-1
            defw DESTINATION2+&98+&43+&130;
;
EXTRA30
          defb extra_duration
            defb SET_PAL_13P
            DEFW EFFET_GREETR2
; line 4 : RIGHT zone
            defw HUGSM2_2+7-6-1
            defw DESTINATION2+&98+&43+&130;
;            
; -------------------------------------------------------------------------------------           
; Displays: STATIC BND / Hugs Mode 2
; Transfert 
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_17P
            DEFW EFFET_STATIC1
; line 1 : LEFT zone 
            defw GFX_CREDINT1+8
            defw DESTINATION1

            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_17P
            DEFW EFFET_STATIC1
; 
            defw GFX_M2_CREDITS_INT1_C5 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_17P
            DEFW EFFET_STATIC1
; line 2 : LEFT zone 
            defw GFX_CREDINT2+8
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_17P
            DEFW EFFET_STATIC1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5
            defw DESTINATION1+&98+&43
;
EXTRA31     defb extra_duration
            defb SET_PAL_17P
            DEFW EFFET_STATIC1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5
            defw DESTINATION1+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_18P
            DEFW EFFET_STATIC2
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_CREDINT1-1+8 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_18P
            DEFW EFFET_STATIC2
; line 3 : RIGHT zone
            defw GFX_M2_CREDITS_INT1_C5-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_18P
            DEFW EFFET_STATIC2
; line 4 : LEFT zone 
            defw GFX_CREDINT1-1+8
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_17P
            DEFW EFFET_STATIC2
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5-1
            defw DESTINATION1+&98+&43+&130;
;
EXTRA32  
            defb extra_duration
            defb SET_PAL_17P 
            DEFW EFFET_STATIC2
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5-1
            defw DESTINATION1+&98+&43+&130;

; -------------------------------------------------------------------------------------           
; Displays: CREDITS INTRO MO / Mode 2
; Transfert 
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 2 : LEFT zone 
            defw GFX_CREDPOL1+6
            defw DESTINATION2

            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; 
            defw GFX_M2_CREDITS_POL1_C5 ; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 2 : LEFT zone 
            defw GFX_CREDPOL2+6
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_POL2_C5
            defw DESTINATION2+&98+&43
;
EXTRA33     defb extra_duration
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_POL2_C5
            defw DESTINATION2+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_CREDPOL1-1+6 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 3 : RIGHT zone
            defw GFX_M2_CREDITS_POL1_C5-1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 4 : LEFT zone 
            defw GFX_CREDPOL2-1+6
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_POL2_C5-1
            defw DESTINATION2+&98+&43+&130;
;
EXTRA34 
            defb extra_duration
            defb SET_PAL_5P
            DEFW EFFET_CREDITS_INT1
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_POL2_C5-1
            defw DESTINATION2+&98+&43+&130;
;
; Displays: CREDITS POLAR
; Transfert 
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 1 : LEFT zone 
            defw GFX_CREDTHIS1+8
            defw DESTINATION1

            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; 
            defw GFX_M2_CREDITS_INT1_C5 ; source
            defw DESTINATION1+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 2 : LEFT zone 
            defw GFX_CREDTHIS2+8
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5
            defw DESTINATION1+&98+&43
;
EXTRA35     defb extra_duration
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 2 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5
            defw DESTINATION1+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_CREDTHIS1-1+8 ; source
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
            ; line 3 : RIGHT zone
            defw GFX_M2_CREDITS_INT1_C5-1 
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 4 : LEFT zone 
            defw GFX_CREDTHIS2-1+8
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL1
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5-1
            defw DESTINATION1+&98+&43+&130;
;
EXTRA36 
            defb extra_duration
            defb SET_PAL_7P
            DEFW EFFET_CREDIT_POL2_STOP_JUMP
; line 4 : RIGHT zone
            defw GFX_M2_CREDITS_INT2_C5-1
            defw DESTINATION1+&98+&43+&130;
;
;TAB_SCENARIO
; -------------------------------------------------------------------------------------           
; Displays: CREDITS THIS MO / Mode 2
; Transfert 
; LAST CREDIT - LAST CREDIT - LAST CREDIT - LAST CREDIT - LAST CREDIT - LAST CREDIT - LAST CREDIT - 
            defb TRANS_L_LENGTH 
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC4
; line 2 : LEFT zone 
            defw LAST_LINE+5
            defw DESTINATION3

            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; 
            defw LAST_LINE ; source
            defw DESTINATION4+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC4
; line 2 : LEFT zone 
            defw LAST_LINE+5
            defw DESTINATION3+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; line 2 : RIGHT zone
            defw LAST_LINE
            defw DESTINATION4+&98+&43
;
EXTRA37     defb extra_duration
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; line 2 : RIGHT zone
            defw LAST_LINE
            defw DESTINATION4+&98+&43
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC4
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw LAST_LINE-1+5 ; source
            defw DESTINATION3+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; line 3 : RIGHT zone
            defw LAST_LINE-1
            defw DESTINATION4+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC4
; line 4 : LEFT zone 
            defw LAST_LINE-1+5
            defw DESTINATION3+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; line 4 : RIGHT zone
            defw LAST_LINE-1
            defw DESTINATION4+&98+&43+&130;
;
EXTRA38 
            defb extra_duration
            defb SET_PAL_22P
            DEFW EFFET_CREDITS_THISC5
; line 4 : RIGHT zone
            defw LAST_LINE-1
            defw DESTINATION4+&98+&43+&130;
;
; FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - FINAL - 
;  BLACK SCREEN 
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; 
            defw GFX_M0_30YEARS+11
            defw DESTINATION1 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; 
            defw GFX_M0_30YEARS+1 ; source
            defw DESTINATION1+&43 ; destination
;         
; 
            defb TRANS_L_LENGTH 
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; line 2 : LEFT zone 
            defw GFX_M0_30YEARS+11+80
            defw DESTINATION1+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+1+80
            defw DESTINATION1+&98+&43

EXTRA39
            defb extra_duration+5
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
            defw GFX_M0_30YEARS+1+80
            defw DESTINATION1+&98+&43

; //////
            defb TRANS_L_LENGTH
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
;
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_M0_30YEARS+11-1
            defw DESTINATION1+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; line 3 : RIGHT zone
            defw GFX_M0_30YEARS+1-1
            defw DESTINATION1+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; line 4 : LEFT zone 
            defw GFX_M0_30YEARS+11-1+80
            defw DESTINATION1+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+1-1+80
            defw DESTINATION1+&98+&43+&130
;
; ////////
EXTRA40
            defb extra_duration-5
            defb SET_PAL_0P
            DEFW EFFET_START_BLACK
            defw GFX_M0_30YEARS+1-1+80
            defw DESTINATION1+&98+&43+&130
;
; 30 YEARS - 30 YEARS - 30 YEARS - 30 YEARS - 30 YEARS - 30 YEARS
;

            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_8
            DEFW EFFET_30Y_DOUBLE
;
            defw GFX_M0_30YEARS+11  ; source+++++++++++++++++++++++++++++++++++++++
            defw DESTINATION4 ; destination
;
            defb TRANS_R_LENGTH ; 80

             defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; 
            defw GFX_M0_30YEARS+1 ; source
            defw DESTINATION3+&43 ; destination
;         
            defb TRANS_L_LENGTH 

           defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE

; line 2 : LEFT zone 
            defw GFX_M0_30YEARS+11+80
            defw DESTINATION4+&98
;         
            defb TRANS_R_LENGTH

           defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+1+80
            defw DESTINATION3+&98+&43

;
EXTRA41 
            defb extra_duration

           defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+1+80
            defw DESTINATION3+&98+&43
;            
;
            defb TRANS_L_LENGTH 

            defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_M0_30YEARS+11-1 ; source
            defw DESTINATION4+&130 ; destination
;           
            defb TRANS_R_LENGTH

             defb SET_PAL_8
            DEFW EFFET_30Y_DOUBLE
; line 3 : RIGHT zone
            defw GFX_M0_30YEARS+1-1
            defw DESTINATION3+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; line 4 : LEFT zone 
            defw GFX_M0_30YEARS+11-1+80
            defw DESTINATION4+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_8
            DEFW EFFET_30Y_DOUBLE
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+1-1+80
            defw DESTINATION3+&98+&43+&130
;            
EXTRA42

            defb extra_duration
            defb SET_PAL_8 
            DEFW EFFET_30Y_DOUBLE
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+1-1+80
            defw DESTINATION3+&98+&43+&130
;
; CROSSED 30Y / BENEDICTION MODE 2 - CROSSED 30Y / BENEDICTION MODE 2 - CROSSED 30Y / BENEDICTION MODE 2 -
;
            defb TRANS_L_LENGTH ; 64
            defb SET_PAL_10 
            DEFW EFFET_FINAL
            defw GFX_BNDM2_LEFT1+4  ; source+++++++++++++++++++++++++++++++++++++++
            defw DESTINATION2 ; destination
;
            defb TRANS_R_LENGTH ; 80
            defb SET_PAL_10 
            DEFW EFFET_FINAL2
; 
            defw GFX_M0_30YEARS+7-6 ; source
            defw DESTINATION2+&43 ; destination
;         
            defb TRANS_L_LENGTH 
            defb SET_PAL_10 
            DEFW EFFET_FINAL2

; line 2 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4
            defw DESTINATION2+&98
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_10 
            DEFW EFFET_FINAL2
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80
            defw DESTINATION2+&98+&43

;
EXTRA43 
            defb extra_duration
            defb SET_PAL_10 
            DEFW EFFET_FINAL2
; line 2 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80
            defw DESTINATION2+&98+&43
;            
;
            defb TRANS_L_LENGTH 
            defb SET_PAL_10 
            DEFW EFFET_FINAL
; -----------------------------------------------------            
; line 3 : LEFT zone 
            defw GFX_BNDM2_LEFT1+4-1 ; source
            defw DESTINATION2+&130 ; destination
;           
            defb TRANS_R_LENGTH
            defb SET_PAL_10 
            DEFW EFFET_FINAL
; line 3 : RIGHT zone
            defw GFX_M0_30YEARS+7-6-1
            defw DESTINATION2+&43+&130
;            
            defb TRANS_L_LENGTH 
            defb SET_PAL_10
            DEFW EFFET_FINAL
; line 4 : LEFT zone 
            defw GFX_BNDM2_LEFT2+4-1
            defw DESTINATION2+&98+&130
;         
            defb TRANS_R_LENGTH
            defb SET_PAL_10
            DEFW EFFET_FINAL
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80-1
            defw DESTINATION2+&98+&43+&130
;            
EXTRA44

            defb extra_duration
            defb SET_PAL_10 
            DEFW EFFET_FINAL
; line 4 : RIGHT zone
            defw GFX_M0_30YEARS+7-6+80-1
            defw DESTINATION2+&98+&43+&130 
;
; LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOP
;

            defb 48 ; 64
            defb SET_PAL_0P
            DEFW EFFET_EMPTY_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1 ; destination

            defb 48 ; 64
            defb SET_PAL_0P
            DEFW EFFET_EMPTY_BLACK
; 
            defw GFX_CREDINT1  ; source
            defw DESTINATION1 ; destination

;            
            defb 0 

Full Source

Show Source
	include once "config.asm"
	include once "../linking/src/demosystem/common.asm" 
	include once "../linking/src/demosystem/public.asm"


	BANK &C0

	org &800
	run &800 
start_800
	include "multimoderupture8.asm"  
	assert $<0x4000
length_800 equ $ - start_800 


	org &4000
start_4000 
	incbin "files/LOGO965.SCR"
	org &5000
; 30*4 positions
FILE_OFFSET     
	incbin "files/OFFSET.TAB" 
;  
;    align  256 
	org &5800
TAB_MOVEX 

	IF STATIC=0

  incbin "files/MOVE-XA.TAB" ; 
   incbin "files/MOVE-XA.TAB" 
; s
	else
	repeat 16
	
;	defb 33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64
	defb 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32
;	defb 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99
;	defb 100,101,102,103,104,105,106,107,108 ; ,109
	;,110,111,112,113,114,115,116,117,118,119,120
	rend
;	
	endif
 
;		align 256
	org &6000
TAB_MOVEY 
	incbin "files/MOVEY5.TAB" 
;


	align 256

TABLE ; Offset, R13 selection for OUTI
    repeat 16
	  defw &060d     
    rend  
; 
;	defw &000c ; LOGO Offset, R12 selection for OUTI 
;	
	  repeat 17
	  defw &060d     
    rend  
	defw &FFFF
;	defw &000d ; LOGO Offset, R12 selection for OUTI 
		align 128
TABLE_OFFSET_FINAL
	repeat 34
	defw &060d
	rend
;
	defw &FFFF

align 256


TABLE_RET
	repeat 34
	defw POS7_2
	rend

	align 128
TABLE_RET_FINAL
; 29 lignes 15+14
		repeat 15
		defw POS7_2
        rend
; 4 lines
		defw LOGO_ZONE
;
		repeat 14
		defw POS7_2
		rend
POK_EXIT defw EXIT                       ; 
;		defw EXIT
POK_LOGO_ZONE defw LOGO_ZONE	
	org &6800
	align 256
TABLE_MOVE
; 30 positionss
		defw POS6_2
		
;		defw POS6_2,POS6_2,POS6_2
		defw POS7_2,POS7_2,POS7_2,POS7_2
		defw POS8_2,POS8_2,POS8_2,POS8_2
		defw POS9_2,POS9_2,POS9_2,POS9_2
;		
		defw POS10_2,POS10_2,POS10_2,POS10_2
		defw POS11_2,POS11_2,POS11_2,POS11_2
		defw POS12_2,POS12_2,POS12_2,POS12_2
		defw POS13_2,POS13_2,POS13_2,POS13_2
		defw POS14_2,POS14_2,POS14_2,POS14_2
		defw POS15_2,POS15_2,POS15_2,POS15_2


		defw POS16_2,POS16_2,POS16_2,POS16_2
		defw POS17_2,POS17_2,POS17_2,POS17_2
        repeat 4
		defw POS18_2
		rend
        repeat 4
		defw POS19_2
		rend
		repeat 4
		defw POS20_2
		rend
		repeat 4
		defw POS21_2
		rend
		repeat 4
		defw POS22_2
		rend 
		repeat 4	
		defw POS23_2
		rend
		repeat 4
		defw POS24_2
		rend
		repeat 4
		defw POS25_2
		rend 
		repeat 4
		defw POS26_2
		rend   
		repeat 4
		defw POS27_2
		rend 
		repeat 4
		defw POS28_2
		rend
		repeat 4
		defw POS29_2
		rend
		repeat 4
		defw POS30_2
		rend
		repeat 4 
		defw POS31_2  
		rend 
		repeat 4
		defw POS32_2
		rend
		repeat 4
		defw POS33_2
		rend
		repeat 4
		defw POS34_2 
		rend
		repeat 4+16
		defw POS35_2
		rend
;		

	org &7000
TAB_MOVEXI 
;
   incbin "files/MOVE-XI.TAB" ; 
   incbin "files/MOVE-XI.TAB" 
TAB_MOVEXI2    
   incbin "files/MOVE-XI2.TAB" ; 
   incbin "files/MOVE-XI2.TAB"	


   org &7fff
length_4000 equ $- start_4000
	assert length_4000 <= 0x4000

	org &c000
start_c000
	incbin "files/TEST2.SCR" ; "CYCBAND3.SCR" ; CYCSNOW.SCR" ;CYCBAND3.SCR"
	if $ != 0
length_c000 equ $-start_c000
	else
	assert $ == 0
length_c000 equ &4000
	endif
	assert length_c000 <= 0x4000
 
;

 	BANK BKMUSIC
	org &4b42 : assert  FapPlay == &4b42
start_c6
	include "music.asm"
	print {hex}$ 
length_c6 equ $-start_c6 
	assert $<0x8000 

	print length_c6
;
	BANK &C4
	org &4000
start_c4
BITMAPS	incbin "files/BITMAPSS.SCR"	  

	print "start_c4: ", {hex}start_c4
	print "stop_c4: ", {hex}$ 
;	
;length_c4 equ $-start_c4 ; BUG $ equals 0 instead of 0x8000
length_c4 equ 0x4000
;
	BANK &C5
	org &4000 
start_c5
BITMAPS2 incbin "files/BK25.SCR"	 

	print "start_c5: ", {hex}start_c5
	print "stop_c5: ", {hex}$
;	 
;length_c4 equ $-start_c4 ; BUG $ equals 0 instead of 0x8000
length_c5 equ 0x4000


	BANK &C7    
	org &4000 
start_c7 
BITMAPS3  incbin "files/BANK33.SCR"	   

	print "start_c7: ", {hex}start_c7
	print "stop_c7: ", {hex}$
;	
;length_c4 equ $-start_c4 ; BUG $ equals 0 instead of 0x8000
length_c7 equ 0x4000

	BANK &C0
	save "MAIN.4000", start_4000, length_4000
	save "MAIN.C000", start_c000, length_c000

	save "MAIN.800", start_800, length_800

 	BANK BKMUSIC
	save "C6.4b42", start_c6, length_c6

	BANK &C4
	save "C4.4000", start_c4, length_c4
	BANK &C5
	save "C5.4000", start_c5, length_c5
	BANK &C7
	save "C7.4000", start_c7, length_c7

Full Source

Show Source

; transfert routine from memory
; to the next visible scrollers
;
;    breakpoint
; &180 bytes free per line
; Destination: 
; +&00 : start gfx Left pos 1
; +&44 : start gfx right pos 1
; +&98 : start gfx left pos 2
; +&DD : start gfx right pos 2
; 

TRANSFERT
         
         ;    breakpoint
INC_POSITION_TRANSFERT ld a,255
            inc a
          ;  and &7F
            ld (INC_POSITION_TRANSFERT+1),a
; 
            ld l,a
            ld h,0
;            
            ld c,a
            ld b,h
DESTINATION      ld de,&c000 ; line 0
            add hl,de
            ex de,hl


SOURCE      ld hl,&c600
            add hl,bc
;
            ld a,(hl)
            ld (de),a
;
            set 5,h     ; line          
            set 5,d
;             
            ld a,(hl)
            ld (de),a
;
            set 4,h     ; line        
            set 4,d
;   
            ld a,(hl)
            ld (de),a
;
            set 3,h     ; line        
            set 3,d

            ld a,(hl)
            ld (de),a
;
            res 4,h     ; line         
            res 4,d
;            
            ld a,(hl)
            ld (de),a
;
            res 5,h     ; line        
            res 5,d
;
            ld a,(hl)
            ld (de),a
;
            set 4,h
            set 4,d  
;
            ld a,(hl)
            ld (de),a
;
            res 3,h
            res 3,d
; 
            ld a,(hl)
            ld (de),a                       
;    
;            inc hl
;            ld (SOURCE+1),hl
     ;       ret
;    breakpoint

Full Source

Show Source
;;; This file contains the various functions that could be useful to manipulate the basic input. Especially to retrieve parameters from the line typed by the user.
;;; To reduce the memory usage, functions are only assembled if used.
;;;
;;; Example:
;;; ```
;;;
;;; ; To be called one time to avoid search issues
;;; call ds_secure_basic_line
;;;
;;; ; Get the numberic value of the CRTC parameter (CRTC=2 for example)
;;; call ds_basic_get_crtc_selection
;;; call z, handle_crtc_detection
;;;
;;; ; Check the string value of the PART parameter (PART=INTRO for example)
;;; DS_BASIC_GET_PARAM("PART")
;;; 



BASIC_input_area_for_lines_ EQU $ac8a

	ifused ds_basic_first_comment_char_address
;;
;; look for the first character of the first comment in the basic program line
;; MODIFIED:
;;    A, DE
;; RETURNS:
;;   - HL: address of the first character of the first comment in the basic program line
;;     BC: the number of remaining bytes in the line
;;   - Z is set if comment found
ds_basic_first_comment_char_address
	ld hl, BASIC_input_area_for_lines_
	ld bc, 255
	ld a, "'"
	cpir

	ret nz

	push af
		ld de, BASIC_input_area_for_lines_ + 256
		ex de, hl
		or a : sbc hl, de
		ex hl, de
		ld bc, de
	pop af

	ret
	endif

	ifused ds_secure_basic_line
;; Ensure the rest of the line is compose of 0 to avoid mismatch of previous input
ds_secure_basic_line
	; search the end of string
	ld hl, BASIC_input_area_for_lines_
	ld bc, 255
	ld a, 0
	cpir

	; fill the rest of the line with 0
	ld de, hl : dec hl
	ldir

	ret
	endif

	ifused ds_basic_get_crtc_selection
;;
;; Look for the crtc version requested by the user in the basic program line
;; post condition:
;;   Z flag set if found
;;   - A: crtc version (0-4)
ds_basic_get_crtc_selection

	ld hl, ds_basic_crtc_keyword.start
	ld a, ds_basic_crtc_keyword.length
	jr ds_basic_get_integer_param

ds_basic_crtc_keyword
.start
	db "CRTC="; upper case mandatory
.length equ $ - .start

	endif


	ifused ds_basic_get_integer_param
;;
;; Search the named parameter in the basic program line and retrieve its integer value
;; pre condition
;; - HL: address of the first character to search from
;; - A: length of the screen
;; post condition
;; Z flag set if an integer parameter is found
;; A: integer parameter value if any
ds_basic_get_integer_param

	; store the searched string info
	ld (ds_search_end_of_substring.searched_string_length), a
	ld (ds_search_end_of_substring.searched_string_address), hl

	; retreive the address of the first comment char
	call ds_basic_first_comment_char_address
	ret nz

	; really do the search
	call ds_search_end_of_substring
	ret nz

.found
	; retrieve the crtc version
	;inc hl => no need to inc as we are just after the '='
	ld a, (hl)
	sub '0'
    
	; ensure Z flag is set
	ld b, a
	xor a : or a
	ld a, b
	ret
	endif

	ifused ds_search_end_of_substring
;;
; case insensitive search for a substring in a memory area
;; Prerequisites:
;;   - HL: address of the first character to search from
;;     .searched_string_length: length of the string to search
;;     .searched_string: the string to search
;;   - BC number of bytes to search in (<256)
;; Postcondition:
;;  - HL address of the first character after the searched string if found
;;  - Z is set if found
ds_search_end_of_substring
	ld (.starting_search_address), hl
	;; Search the very first letter of the searched string
.search_first_letter
	ld hl, (.starting_search_address)  ; retreive the address where to start reading
	ld de, (.searched_string_address)
	ld b, c 
	ld a, (de)      ; get the first char to search
	ld c, a
.first_letter_loop
		ld a, (hl) : inc hl
		call ds_ensure_upper_case
		cp c
		jr z, .found_first_letter
	djnz .first_letter_loop
	ret; NZ set
.found_first_letter
	ld (.starting_search_address), hl  ; we will start with this address next time

	; check the next letters
	push bc
		ld a, (.searched_string_length)
		dec a ; remaining letters to check
		ld b, a
.remaining_loop
			inc de ; next char to compare
			ld a, (de) : ld c, a

			ld a, (hl)
			call ds_ensure_upper_case

			cp c
			jr nz, .need_to_restart ; not matching, search again from the beinning of keyword
			inc hl ; move in memory search space
		djnz .remaining_loop
.found
	pop bc
	ret


.need_to_restart
	pop bc
	jr .search_first_letter


.searched_string_length
	db 0
.searched_string_address
	dw 0
.starting_search_address 
	dw 00

	endif


	ifused ds_ensure_upper_case
;;
; Prerequisit
; - A: character 
; Post condition
; - A: uppercase character
ds_ensure_upper_case
	cp 'a'-1
	jr c, .upper
	cp 'z'
	jr nc, .upper
	sub 'a' - 'A'
.upper
	ret
	endif

Full Source

Show Source
	;; Search a given parameter in the basic program line
	;; Input
	;;  - param: the parameter to search (as a string)
	macro DS_BASIC_GET_PARAM param
	    jr @execute
@param 
	defb {param}
	defb '='
@execute
		; setup the parameters to search the string
		ld hl, @param
		ld a, string_len({param}) + 1 ; +1 for the '='
		ld (ds_search_end_of_substring.searched_string_length), a
		ld (ds_search_end_of_substring.searched_string_address), hl

		; skip process if there is no comment in the basic prompt
		call ds_basic_first_comment_char_address
		ret nz

		call ds_search_end_of_substring
	endm


	;; Check if a parameter is equal to a given value.
	;; ATTENTION! This version does in fact a prefix search, there is no
	;; notion of the end of the parameter value (like a space or comment char).
	;; 
	;;
	;; Precondition
	;;  - HL: address of the first character after the '=' of the parameter
	;;    The string is at max 255 characters long.
	;; Input
	;;  - value: the value to compare to (as a string)
	;; Modified values
	;;  - BC
	;; Postcondition
	;;  - Z flag set if the parameter value is equal to the given value
	;;  -HL points to the next character after the compared value

	macro DS_BASIC_PARAM_IS value
		jr @execute
@value
		defb {value}
@execute

		ld de, @value
		ld a, string_len({value})
		ld (ds_search_end_of_substring.searched_string_length), a
		ld (ds_search_end_of_substring.searched_string_address), de

		ld bc, 255 ; TODO check if we can provide a value
		call ds_search_end_of_substring
	endm

Full Source

Show Source
;;
;; Mini booster handling stuff
;; https://cpcrulez.fr/hardware-serie-interface_minibooster.htm
;; v0 come from CRTC demo

	ifndef __DS__BOOSTER__
__DS__BOOSTER__
	
	BOOSTER_COMMUNICATION_PORT equ 0xFF08
	
	;;
	;; Properly parametrize the CPC booster serial communication
	;; The code is adapted for cpcbooster or minibooster
	macro DS_PRIVATE_CPCBOOSTER_INIT_COMMUNICATION
		if USE_CPCBOOSTER
			;Is the card present?
			ld bc,#ff00
			in a,(c)
			cp 170
			jr nz,@Initialize_Failure
			inc c
			in a,(c)
			cp 85           ;CPC Booster.
			jr z,@Initialize_CPCBooster
			cp 238          ;Mini Booster.
			jr z,@Initialize_MiniBooster
@Initialize_Failure:
			; TODO setup a flag to inform the booster is not here
        	jr @End
@Initialize_CPCBooster:
			ld a,#05                ;Sets Baudrate to 115200 (5). 2 = 230400bps
        	jr @Initialize_Common
@Initialize_MiniBooster:
			ld a,#07       
@Initialize_Common

            ld c,#04
            out (c),c
            out (c),a
                
            ld c,#07		;Asynchronous, no Parity, 1 bit stop, 8 bits carac.
            ld a,%00000110
            out (c),c
            out (c),a

            ld c,#0b		;Enables buffer.
            in a,(c)
            set 4,a
            out (c),a

            ld c,#1c		;Resets buffer.
            xor a
            out (c),a
@End
		endif
	endm


	;; Macro to send a 16-bit register value to the CPC booster communication port
	macro DS_PRIVATE_CPCBOOSTER_SEND_16 reg16
		if USE_CPCBOOSTER
            LD BC, BOOSTER_COMMUNICATION_PORT
            OUT (C), {reg16}.low
            OUT (C), {reg16}.high
		endif
	endm


endif

Full Source

Show Source
;;; This file contains the character control codes for the locomotive text display.
;;; Firmware is able to interpret these codes when they are sent to the text display.


;;
;;  No effect. Ignored. 
CHAR_CTRL_NUL equ 0

;;
;; Print the symbol given by the parameter value. This allows the symbols in the range 0 to 31 to be displayed. 
;; Parameter 0-255 value of the symbol to print
CHAR_CTRL_SOH equ 1
CHAR_CTRL_PRINT_SYMBOL equ CHAR_CTRL_SOH

;;  	Turn off text cursor.
CHAR_CTRL_STX equ 2
CHAR_CTRL_CURSOR_OFF equ CHAR_CTRL_STX

;;  	Turn on text cursor. 
CHAR_CTRL_ETX equ 3
CHAR_CTRL_CURSOR_ON equ CHAR_CTRL_ETX

;;
;;  	Set screen mode.
;; Parameter 0,1,2
CHAR_CTRL_EOT equ 4
CHAR_CTRL_SCREEN_MODE equ CHAR_CTRL_EOT


;;
;; Send the parameter character to the graphics cursor. 
;; Parameter 0-255 value of the symbol to print
CHAR_CTRL_ENQ equ 5
CHAR_CTRL_PRINT_AT_GRAPHICS_CURSOR equ CHAR_CTRL_ENQ

;;
;; Enable Text Screen (see NAK) 
CHAR_CTRL_ACK equ 6
CHAR_CTRL_ENABLE_TEXT_SCREEN equ CHAR_CTRL_ACK

;;
;; Sound Bleeper. Note that this flushes the sound queues.
CHAR_CTRL_BEL equ 7

;;
;; Move cursor back one character
CHAR_CTRL_BS equ 8

;;
;; Move cursor forward one character.
CHAR_CTRL_TAB equ 9


;;
;;  	Move cursor down one line
CHAR_CTRL_LF equ 10


;;
;;  	Move cursor up one line
CHAR_CTRL_VT equ 11


;;
;; Clear text window and move cursor to top left corner.
CHAR_CTRL_FF equ 12
CHAR_CTRL_CLS equ CHAR_CTRL_FF


;;
;; Move cursor to left edge of window on current line.
CHAR_CTRL_CR equ 13


;;
;; Set Paper Ink
;; parameter paper 0-15
CHAR_CTRL_SO equ 14
CHAR_CTRL_PAPER equ CHAR_CTRL_SO


;;
;; Set Pen Ink
;; parameter pen 0-15
CHAR_CTRL_SI equ 15
CHAR_CTRL_PEN equ CHAR_CTRL_SI

;;
;;  	Delete current character
CHAR_CTRL_DLE equ 16


;;
;; Clear from left edge of window to, and including, the current character position
CHAR_CTRL_DC1 equ 17

;;
;; 	Clear from, and including, the current character position to the right edge of window.
CHAR_CTRL_DC2 equ 18

;;
;;  	Clear from start of window to, and including, the current character position.
CHAR_CTRL_DC3 equ 19

;;
;;  	Clear from, and including, the current character position to the end of window.
CHAR_CTRL_DC4 equ 20


;;
;; Turn off text screen. The screen will not react to anything sent to it until after an ACK is sent
CHAR_CTRL_NAK equ 21

;;
;; Set transparency 
;; Parameter (0 disables, 1 enables) 
CHAR_CTRL_SYN equ 22
CHAR_CTRL_TRANSPARENCY equ CHAR_CTRL_SYN
;;
;;  	Set graphics ink mode. 
;; Parameter 0 normal (overwrite), 1 XOR, 2 AND, 3 OR 
CHAR_CTRL_ETB equ 23
CHAR_CTRL_GRAPHICS_INK_MODE equ CHAR_CTRL_ETB

;;
;; Exchange Pen and Paper Inks, effectively applying the reverse video effect
CHAR_CTRL_CAN equ 24

;;
;; Set the matrix for user definable character. The first parameter specifies which character's matrix to set. The next eight specify the matrix.
CHAR_CTRL_EM equ 25
CHAR_CTRL_SYMBOL equ CHAR_CTRL_EM

;;
;; Set Window. The parameters specify left, right, top and bottom edges of the window.
;; Parameters 1-80, 1-80, 1-25, 1-25
CHAR_CTRL_SUB equ 26
CHAR_CTRL_WINDOW equ CHAR_CTRL_SUB


;;
;; No effect. Ignored. 
CHAR_CTRL_ESC equ 27

;;
;; Set Ink to a pair of colors. The first parameter specifies the Ink, the next two the required colors
;; Parameters 0-15, 0-31, 0-31
CHAR_CTRL_FS equ 28
CHAR_CTRL_INK equ CHAR_CTRL_FS

;;
;; Set Border to a pair of colors. Equivalent to a BORDER command. The two parameters specify the two colors.
;; Parameters 0-31, 0-31
CHAR_CTRL_GS equ 29
CHAR_CTRL_BORDER equ CHAR_CTRL_GS

;;
;; Move cursor to top left hand corner of window. 
CHAR_CTRL_RS equ 30


;;
;; Move cursor to the given position in the current window. The first parameter gives the column to move to, the second gives the line.
;; Parameters  	1-80, 1-25
CHAR_CTRL_US equ 31
CHAR_CTRL_LOCATE equ CHAR_CTRL_US


;; Generates list list of character control codes to select screen mode
function CHARS_CTRL_SCREEN_MODE m
	assert {m}>=0 && {m}<=2
	return [CHAR_CTRL_SCREEN_MODE, {m}]
endf

;; Generates list of character control codes to set ink colors
function CHARS_CTRL_PEN p, i1, i2
	return [CHAR_CTRL_PEN, {p}, {i1}, {i2}]
endf


;; Generates list of character control codes to set border colors
function CHARS_CTRL_BORDER  i1, i2
	assert {i1} >=0 && {i1} <= 31
	assert {i2} >=0 && {i2} <= 31
	return [CHAR_CTRL_BORDER, {i1}, {i2}]
endf

;; Generates list list of character control codes to select paper pen
function CHARS_CTRL_SELECT_PEN pen
	assert {pen} >= 0 && {pen} <= 15
	return [CHAR_CTRL_PEN, {pen}]
endf

;; Generates list list of character control codes to print a symbol
function CHARS_CTRL_PRINT_SYMBOL sym
	assert {sym} >= 0 && {sym}<=255
	return [CHAR_CTRL_SOH, {sym}]
endf

;; Generates list list of character control codes to locate the cursor
function CHARS_CTRL_LOCATE x, y
	return [CHAR_CTRL_LOCATE, {x}, {y}]
endf

Full Source

Show Source
;;; Character codes definitions according to the basic char encoding

CHAR_HEART equ 0xe4

Full Source

Show Source
;;
;; common.asm contains macros that would be usefull with any demo system.


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;          KEYBOARD HANDLING         ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;;
;; Generate the routine to check if the user pressed space
macro DS_PRODUCE_KEYSPACE_ROUTINE
    ;;
    ; Check if user pressed space
    ds_keyspace
		DS_KEYSPACE()
		ret

endm

;;
;; Generate the code to check if the user pressed space
macro DS_KEYSPACE
        LD	BC,#F40E
        OUT	(C),C
        LD	BC,#F6C0
        OUT	(C),C
;  XOR	A
;  OUT	(C),A
  		defb &ed,&71
        LD	BC,#F792
        OUT	(C),C
        LD	BC,#F645
        OUT	(C),C
        LD	B,#F4
        IN	A,(C)
        LD	BC,#F782
        OUT	(C),C
;  LD	BC,#F600
;  OUT	(C),C
		dec b
		defb &ed,&71
;		
        RLA	
endm


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;          SOUND  HANDLING           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;





;; Generate the routine to stop any sound.
;; Direct access to AY is done, not to firmware
macro DS_PRODUCE_STOP_SOUND_ROUTINE
; Stop any sound
; based on the AKM player
; only 4 Registers need to be used
	ds_stop_sound
STOP_SOUND
;
 	ld bc,#f680 
        ld a,&c0
	ld de,#f4f6
        out (c),a
; H= PSG register L=value	
	ld hl,&0700+%00111111                ; &07 = Mixer 
	call SendPsgRegister
	ld hl,&0800			    ; &08 = Volume Voice 1
	call SendPsgRegister
	inc h				    ; &09 = Volume Voice 2
	call SendPsgRegister
	inc h			            ; &10 = Volume Voice 3
;	call SendPsgRegister
        

            ;    ld l,%00111111          ;On CPC, bit 6 must be 0. Other platforms don't care.
SendPsgRegister:
    
        ld b,d
        out (c),h       ;#f400 + register.
        ld b,e
        out (c),0       ;#f600
        ld b,d
        out (c),l       ;#f400 + value.
        ld b,e
        out (c),c       ;#f680
        out (c),a       ;#f6c0
;
	ret	

endm



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;            VSYNC HANDLING          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



;; Generate the routine to wait the beginning of the next VSYNC,
;; ensuring we are not already in VSYNC
macro DS_PRODUCE_SECURE_WAIT_VSYNC_ROUTINE
ds_secure_wait_vsync
	DS_SECURE_WAIT_VSYNC()
	ret
endm


;;
;; Wait the beginning of the next VSYNC, ensuring we are not already in VSYNC
macro DS_SECURE_WAIT_VSYNC
	ld b, 0xf5
@wait_novsync
	in a, (c)
	rra
	jr c, @wait_novsync

@wait_vsync
	in a, (c)
	rra
	jr nc, @wait_vsync
endm


;; Generate the routine to wait the beginning of the next VSYNC
macro DS_PRODUCE_WAIT_VSYNC_ROUTINE
ds_wait_vsync
	DS_WAIT_VSYNC()
	ret
endm


;; Wait VSYNC, even if it is already started
macro DS_WAIT_VSYNC
	ld b, 0xf5
@wait_vsync
	in a, (c)
	rra
	jr nc, @wait_vsync
endm

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;           WAIT HANDLING            ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	;;
	;; Wait N microseconds (max wait 1021 ms / length 4 - 7 bytes)
	;; Initial code from @Syx
	MACRO DS_WAIT_MICROSEG duration
@k EQU {duration} - 1
		LD   B,@k / 4                      ; (2 = 1 that we subtracted and 1 that is missing from the DJNZ)
		DJNZ $                              ; (4 * [N - 1] + 3 = 4 * N - 1)
		DEFS @k % 4                        ; (1 * [4 * N - 1] % 4)
	ENDM





	;;  Wait a number of CPU cycles (max wait 1024 cycles) 
    MACRO   WAIT_CYCLES cycles
		assert {cycles} <= 1024, 'Too many nops'
		assert {cycles} > 0, 'Wait time must be positive'

		; Compute the number of loops and extra nop
	@loops     equ ({cycles}-1)/4 
	@loopsx4   equ @loops*4
	@nops      equ {cycles}-@loopsx4-1

		; Produce a loop only if required
		if @loops != 0
			ld  b, @loops
	@change_waitLoop
			djnz    @change_waitLoop
		endif

		; Produce extra nops
		defs    @nops, 0

    endm


    ;;
    ;; Macro able to wait more than 1024 nops. Relay on WAIT_CYCLES
    MACRO LONG_WAIT_CYCLES cycles

        if {cycles} <= 1024
            WAIT_CYCLES {cycles}
        else
            WAIT_CYCLES 1024
            LONG_WAIT_CYCLES {eval}({cycles} - 1024)
        endif
    ENDM



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;             CRTC HANDLING          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;
;; WRITE_CRTC: Writes a value to a CRTC register
;; Corrupts: BC
;; XXX we need to keep this slow and long code for crunch and duration purpose
MACRO DS_WRITE_CRTC register, value
        LD   BC, &bc00 + {register}
        OUT  (C),C
        LD   BC, &bd00 + {value}
        OUT  (C),C
ENDM


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;     CRTC TRANSITIONS HANDLING      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



; This allows to move the transisition forwards or backwards on the line. This value is a good
; compromise to have it near the middle of the line, far from the HBL
        ifndef __DS_HT_delay1
__DS_HT_delay1 equ 26
        endif

	;; Original code: pulko mandy
	;; Horizontal CRTC transition from R2=from to R2=to
	;; Valeur limites:
	;; - New R6 >= 2
	;; - New R6 - Old R6 >= 31
	;; ça devrait être suffisant dans la plupart des cas?
	;; Pour les transitions avec New R6 - Old R6 plus grand que 31, on peut appeler la macro 2 fois,
	;; par exemple pour transitionner de R2=2 à R2=46 en douceur:
	;; HT 2, 31
	;; HT 31, 46
	;
	;; Il doit être possible de déterminer ce qu'il se passe exactement et d'écrire un cas particulier
	;; de la macro si on veut.
	;;
	;; Music MUST not play under interruption for timing reasons
	;; XXX no deeply tested yet
	MACRO DS_CRTC_HORIZONTAL_TRANSITION_ONLY from, to
@delta EQU ({to}) - ({from})
		DS_WAIT_MICROSEG(__DS_HT_delay1)

		; START OF CRTC TRANSITION, WRITE TEMP R0 ---------------------------------+
		DS_WRITE_CRTC(0, {eval}63 - @delta)  	; 14 NOPs
		DS_WAIT_MICROSEG(64 - 14 - 14)
		xor a                    		; 1 NOP  XXX initial code of Pulko was tagged 1 NOP but using ld a, 0
		DS_WRITE_CRTC(2, {to})         	; 14 NOPs
		DEC B                    		; 13 remaining NOPs of CRTC write
		OUT (C),A
		LD BC, &bd00+63
		; END OF CRTC TRANSITION, RESTORE R0 exactly 64us later -------------------+
		OUT (C), C
	ENDM



	;; Vertical CRTC transition from R7=from to R7=to
	;; Music MUST not play under interruption for timing reasons
	;; XXX no deeply tested yet
	MACRO DS_CRTC_VERTICAL_TRANSITION_ONLY, from, to
		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {from} - {to})
		DS_WRITE_CRTC(7, {to})
		DS_PLAY_MUSIC()

		HALT
		HALT

		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
		DS_PLAY_MUSIC()
	ENDM



	MACRO DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC, from, to
		DS_SECURE_WAIT_VSYNC()

		; Here, C4=({from})

		DS_WRITE_CRTC(4, 38 + ({from}) - ({to}))

		if ({to}) > ({from})
			halt
			halt
			DS_WRITE_CRTC(7, ({to}))
		else
			DS_WRITE_CRTC(7, ({to}))
			HALT
			HALT
		endif

		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
	ENDM



	; XXX no deeply tested yet
	MACRO DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS, vert_from, vert_to, horiz_from, horiz_to
		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
		DS_WRITE_CRTC(7, {vert_to})
		DS_PLAY_MUSIC()

		HALT

		DS_HORIZONTAL_TRANSITION_ONLY(horiz_from, horiz_to)

		HALT


		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
		DS_PLAY_MUSIC()
	ENDM


	MACRO DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC, vert_from, vert_to, horiz_from, horiz_to
		DS_SECURE_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
		DS_WRITE_CRTC(7, {vert_to})

		HALT

		DS_CRTC_HORIZONTAL_TRANSITION_ONLY({eval}{horiz_from}, {eval}{horiz_to})

		HALT


		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
	ENDM


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;       CRTC DETECTION HANDLING      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


macro DS_PRODUCE_CRTC_DETECTOR_ROUTINE
ds_crtc_detector
	DS_CRTC_DETECTOR()
	ret
endm

macro DS_CRTC_DETECTOR

; Source: https://amstradplus.forumactif.com/t22-detecter-son-crtc
; - Last Update : 22/04/2022
;
; On commence en premier lieu par tester si on est sur Amstrad Plus ou pas
;
ld bc,#f782 ; bc=#f782 ; Port B du PPi en entrée
ld e,c      ; e=#82 ; le test est basé sur le bug du ppi
out (c),c   ; de l'Amstrad Plus
dec b       ; b=#f6
ld c,#0f    ; bc=#F60f
out (c),c   ; on envoie une valeur bidon au port #f6 (#0f)
inc  b      ; b=#f7
ld a,e      ; a=#82
out (c),a   ; Port B du PPi en entrée
dec b       ; b=#f6
in a,(c)    ; a=val du port #f6
cp c        ; si la val du port #f6 est égale à #0f
jr z,@crtc3  ; c'est un Amstrad Plus (Crtc 3)
;
; On est pas sur Amstrad Plus
; Les tests crtc 4 et 0 sont basés sur la lecture du poids fort
; du reg12 du crtc
;
ld e,#30 ; on positionne le poids fort de la vRam en #30 (#cxxx)
ld bc,#bc0c
out (c),c ; selection du r12
inc b
out (c),e ; envoie de la valeur au port 12 du crtc
;
; Est-ce un Amstrad Cpc Crtc 4 ?
; On lit le port #be
; Si le résultat obtenu est égal à la valeur de e (vRam)
; Alors c'est un Amstrad Cpc Crtc 4
;
ld b,#be ; detection crtc 4
in a,(c)
cp e ; e=poids fort vRam
jr z,@crtc4
;
; Si ce n'est pas un Amstrad Cpc Crtc 4
; Est ce un Amstrad Cpc Crtc 0 ?
; Pour cela on utilise le port #bf du Crtc
; Si le résultat obtenu est égal à la valeur de e (vRam)
; alors c'est un Amsttrad Cpc Crtc 0
;
ld b,#bf ; detection crtc 0
in a,(c)
cp e ; e=poids fort vRam
jr z,@crtc0
;
; Ce n'est pas un Amstrad Cpc Crtc 0
; Serait-ce par hasard un Amstrad Cpc Crtc 1 ?
;
ld bc,#bc1F ; on teste si c'est un crtc 1
out (c),c ; a sera différent de 0
;
ld b,#bf ; si a=0, ce sera un crtc 2 par élimination.
in a,(c)
jr z,@crtc2
;
; Ce n'est pas un Amstrad Cpc Crtc 2
; c'est donc forcément par élimination, un Amstrad Cpc Crtc 1
;
jr @crtc1
;
; it's a crtc 0
;
@crtc0 xor a : jr @leave
@crtc1 ld a, 1 : jr @leave
@crtc2 ld a, 2 : jr @leave
@crtc3 ld a, 3 : jr @leave
@crtc4 ld a, 4 : jr @leave

@leave
endm

Full Source

Show Source
USE_CPCBOOSTER equ true   ; use the CPCbooster for debugging purposes
USE_BASIC_TIMER equ true ; use basic timers to collect loading durations

Full Source

Show Source
;;;
;;; Krusty/Benediction
;;;
;;; August 2025 - initial version
;;; December 2025 - added ZX0 backward support (of course latest basm is required)
;;;
;;; Provide some utility macros that help to link demos when using a single cruncher. These marcos setup properly the arguments of the uncruncher
;;; and when possible write the appropriate safety checks to avoid overlapping crunched and uncrunched data by using assertions.
;;; Should be reusable in other projects as soon as they are simple enough to use a single cruncher to avoid name clashes.
;;;
;;; This has been written for `basm` but should be easily portable to other assemblers with minor modifications (at least it is almost transparetn for `rasm`, I think only the `next` directive is missing).
;;;
;;; by using this system it is almost frr to change the cruncher used for the entire demo. Just modify SELECTED_CRUNCHER variable after including this file.
;;;
;;; USAGE:
;;; ```z80
;;;    org 0x800
;;;    include "linker_common.asm"
;;;    SELECTED_CRUNCHER = CRUNCHER_ZX0_BACKWARD
;;;
;;;    run $
;;;     di : ld hl, 0xc9fb : ld (0x38), hl : ld sp, $ : ei
;;;
;;;    ; Generate the uncrunching calling code with proper memory checks
;;;    UNCRUNCH(C0_1000, 1000);
;;;    ld bc, 0x7fc4 : out (c), c
;;;    UNCRUNCH(C4_4000, 0x4000);
;;;    ld bc, 0x7fc0 : out (c), c
;;;
;;;    jp 0x1000
;;;
;;;    ; Inject the uncrunch code
;;;    INSTALL_UNCRUNCHER()
;;;    assert $ < 0x1000, "the cruncher overlaps with the code to run"
;;;
;;;    ; Crunch the various files and create the appropriate labels/sublabels
;;;    LOAD_N_CRUNCH(C0_1000, "path/to/uncrunched_data.bin")
;;;    LOAD_N_CRUNCH(C4_4000, "path/to/other_uncrunched_data.bin") 

;;; TODO: 
;;;
;;;  - allow the user to specify the buffer addresses to still earn some bytes
;;;       current version CANNOT fit a 4k production because of this aspect
;;;  - some uncruncher are able to handle some parameters. Handle that cleanly
;;; - Allow the user to decide of the name of the uncrunch routine
;;; - improve assertion test (there are false positive for non backwards assertions)
;;; - Allow the user to  selecte several crunchers without having naming collision
;;; - Add breakpoint to check at execution things that cannot be checked at assembly time

	ifdef SELECTED_CRUNCHER
		fail "You need to specify SELECTED_CRUNCHER after including this file as it provides the cruncher names."
	endif

	; List all possible crunchers and attribute them a number
CRUNCHER_COUNT set 0

;; APLIB cruncher
CRUNCHER_APLIB next CRUNCHER_COUNT

;; EXOMIZER cruncher. Performant but quite slow to uncrunch
CRUNCHER_EXOMIZER next CRUNCHER_COUNT

;; LZ4 cruncher
CRUNCHER_LZ4 next CRUNCHER_COUNT

;; LZ48 cruncher
CRUNCHER_LZ48 next CRUNCHER_COUNT

;; LZ49 cruncher
CRUNCHER_LZ49 next CRUNCHER_COUNT

;; LZSA1 cruncher
CRUNCHER_LZSA1 next CRUNCHER_COUNT


;; LZSA2 cruncher
CRUNCHER_LZSA2 next CRUNCHER_COUNT

;; SHRINKLER cruncher
CRUNCHER_SHRINKLER next CRUNCHER_COUNT

;; CRUNCHER_UPKR cruncher. The best for a 4k demo
CRUNCHER_UPKR next CRUNCHER_COUNT

;; ZX0 cruncher. The best for a standard dem
CRUNCHER_ZX0 next CRUNCHER_COUNT

;; ZX0 backward cruncher. Able to uncrunch from the end to the beginning of the data
CRUNCHER_ZX0_BACKWARD next CRUNCHER_COUNT

;; ZX7 cruncher
CRUNCHER_ZX7 next CRUNCHER_COUNT


	;; Sometimes there are conflicts between the crunched data areas and the uncrunched data areas. Mainly because of banks overlap or lack of free memory.
	;; To avoid this, we first move the crunched data to a safe area, then uncrunch from there.
	macro MOVE_CRUNCHED_DATA from, to
		ld hl, {from}.start
		ld de, {to}
		ld bc, {from}.length
		ldir
	endm




	;; Check if {cruncher} is backward capable.
	;; In this case it needs to be uncrunched from the end of the file up to the beginning. This allows to overlap crunched and uncrunched code
	function CRUNCHER_IS_BACKWARD cruncher
		switch {cruncher}
			case CRUNCHER_ZX0_BACKWARD:
				return true
			default
				return false
		endswitch
	endfunction
	
	;; Load {fname} and crunch it with the selected cruncher.
	;; The crunched data is stored at label {label}.
	;; Additional sublabels are created:
	;;  .start : address of the first byte of crunched data
	;;  .next  : address of the byte after the last byte of crunched data
	;;  .length: length in bytes of the crunched data
	;;  .uncrunched_length: length in bytes of the uncrunched data
	;;
	;; Depends on SELECTED_CRUNCHER
	;;
	;; TODO :
	;;  remove dependecy to SELECTED_CRUNCHER by passing it as parameter
	macro LOAD_N_CRUNCH_WITH cruncher_directive, label, fname
		@content = load({fname})
		{label}
		.start
			{cruncher_directive}
				db @content
			LZCLOSE
		.next
		.last = $-1
		.length = $-.start
		.uncrunched_length = list_len(@content)


		assert BASM_LATEST_CRUNCH_INPUT_DATA_SIZE == .uncrunched_length
		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length

		if CRUNCHER_IS_BACKWARD(SELECTED_CRUNCHER)
			assert SELECTED_CRUNCHER == CRUNCHER_ZX0_BACKWARD, "This case has never been tested, please doublecheck the delta size calculation in basm"
			.delta = BASM_LATEST_CRUNCH_DELTA_SIZE
			assert .delta != -1
		else
			; TODO add delta information for crunchers providing it
			; (for example zx0)
			.delta = -1
		endif

		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {hex}.start,"-",{hex}($-1),"]"
	endm


	;; Add some tests to check that the selected data is valid for non backward crunchers
	;;
	;; Parameters:
	;;
	;;  from: start address of the crunched data (the very first byte)
	;;  to:   address where the uncrunched data will be stored (the very first byte)
	macro UNCRUNCH_PRELUDE_NOT_BACKWARD, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping areas; use delta for that
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm

	;; Add some tests to check that the selected data is valid for backward crunchers
	;;
	;; Parameters:
	;;
	;;  from: start address of the crunched data (the very first byte AND NOT the very last byte)
	;;  to:   address where the uncrunched data will be stored (the very first byte AND NOT the very last byte)
	macro UNCRUNCH_PRELUDE_BACKWARD, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			if {from}.start >= {to}
				assert {to} + {from}.length < {from}.start
			else
				assert {from}.delta != -1, "Delta size must be known for backward crunchers safety"
				assert {to} >= {from.last} + {from}.delta
			endif
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm


	macro INDIRECT_UNCRUNCH_PRELUDE_BACKWARD, moved_from, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			if {moved_from} >= {to}
				assert {to} + {from}.length < {from}.start
			else
				assert {from}.delta != -1, "Delta size must be known for backward crunchers safety"
				assert {to} >= {moved_from} + {from}.length + {from}.delta
			endif
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm

	;; Add some tests to check that the selected data is valid for non backward crunchers (indirect version)
	;;
	;; Parameters:
	;;
	;;  moved_from: address where the crunched data has been moved
	;;  from: start address of the crunched data (the very first byte) BEFORE it has been moved
	;;  to:   address where the uncrunched data will be stored (the very first byte)
	;; XXX This is copilot generated, i have not read the code, it is surely wrong
	; XXX need to check after a sleep
	macro INDIRECT_UNCRUNCH_PRELUDE_NOT_BACKWARD, moved_from, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into account overlapping areas; use delta for that
		endif
		print "Uncrunch from ", {hex}{moved_from}, " (originally ", {hex}{from}, ") to ", {hex}{to}
	endm



	;; Request to uncrunch data from {from} to {to} with the selected cruncher.
	;; Add some tests to check that the selected data is valid.
	;; Parameters:
	;;
	;; - {from}: start address of the crunched data (the very first byte)
	;; - {to}:   address where the uncrunched data will be stored (the very first byte)
	;;
	macro UNCRUNCH_STANDARD_BACKWARD, from, to
		UNCRUNCH_PRELUDE_BACKWARD({from}, {to})

		ld hl, {from}.last
		ld de, {to} + {from}.uncrunched_length - 1
		call uncrunch
	endm


	;; Indirect uncrunch is used when the crunched data has been move elsewhere.
	;; As such the from labels are not correct anymore.
	;;
	;; Parameters:
	;; - {moved_from}: address where the crunched data has been moved
	;; - {from}: start address of the crunched data (the very first byte) BEFORE it has been moved
	;; - {to}:   address where the uncrunched data will be stored (the very first byte)
	;;
	macro INDIRECT_UNCRUNCH_STANDARD_BACKWARD, moved_from, from, to
		INDIRECT_UNCRUNCH_PRELUDE_BACKWARD({moved_from}, {from}, {to})

		ld hl, {moved_from} +  {from}.length - 1
		ld de, {to} + {from}.uncrunched_length - 1
		call uncrunch
	endm

	;; Request to uncrunch data from {from} to {to} with the selected cruncher.
	;; Add some tests to check that the selected data is valid.
	;; Parameters:
	;;
	;; - {from}: start address of the crunched data (the very first byte)
	;; - {to}:   address where the uncrunched data will be stored (the very first byte)
	;;
	macro UNCRUNCH_STANDARD_NOT_BACKWARD, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld hl, {from}
		ld de, {to}
		call uncrunch
	endm
	
	;; Indirect uncrunch is used when the crunched data has been moved elsewhere.
	;; As such the from labels are not correct anymore.
	;;
	;; Parameters:
	;; - {moved_from}: address where the crunched data has been moved
	;; - {from}: start address of the crunched data (the very first byte) BEFORE it has been moved
	;; - {to}:   address where the uncrunched data will be stored (the very first byte)
	;;
	macro INDIRECT_UNCRUNCH_STANDARD_NOT_BACKWARD, moved_from, from, to
		INDIRECT_UNCRUNCH_PRELUDE_NOT_BACKWARD({moved_from}, {from}, {to})

		ld hl, {moved_from}
		ld de, {to}
		call uncrunch
	endm

	;; Request to uncrunch data from {from} to {to} with LZ4 cruncher.
	;; Add some tests to check that the selected data is valid.
	;; Parameters:
	;;
	;; - {from}: start address of the crunched data (the very first byte)
	;; - {to}:   address where the uncrunched data will be stored (The very first byte)v	
	macro UNCRUNCH_LZ4, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})


		ld hl, {from}.start
		ld bc, {from}.length
		ld de, {to}
		call uncrunch
	endm


	;; Request to uncrunch data from {from} to {to} with UPKR cruncher.
	;; Add some tests to check that the selected data is valid.
	;; Parameters:
	;;
	;; - {from}: start address of the crunched data (the very first byte)
	;; - {to}:   address where the uncrunched data will be stored (The very first byte)	
	macro UNCRUNCH_UPKR, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld ix, {from}
		ld de, {to} : exx
		call uncrunch
	endm


	;; Request to uncrunch data from {from} to {to} with SHRINKLER cruncher.
	;; Add some tests to check that the selected data is valid.
	;; Parameters:
	;;
	;; - {from}: start address of the crunched data (the very first byte)
	;; - {to}:   address where the uncrunched data will be stored (The very first byte)	
	macro UNCRUNCH_SHRINKLER, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld ix, {from}.start
		ld de, {to}
		call uncrunch
	endm

	;; Install the uncruncher for exomizer
	macro INSTALL_EXOMIZER
		include once "inner://deexo.asm"
	uncrunch
		Mizoumizeur()
		ret
	endm

	;; Install the uncruncher for aplib
	macro INSTALL_APLIB
			include once "inner://unaplib_fast.asm"
	uncrunch
		ApUnpack()
		ret
	endm

	;; Install the uncruncher for upkr
	macro INSTALL_UPKR
		uncrunch
		include once "inner://uncrunch/upkr.asm"
		org upkr.probs_e ; we need to skip some space for the upkr probe
	endm

	;; Install the uncruncher for lz4
	macro INSTALL_LZ4
		uncrunch
		include once "inner://lz4_docent.asm"
	endm

	;; Install the uncruncher for LZ48
	macro INSTALL_LZ48
		uncrunch
		include once "inner://lz48decrunch.asm"
	endm

	;; Install the uncruncher for LZ49
	macro INSTALL_LZ49
		uncrunch
		include once "inner://lz49decrunch.asm"
	endm

	;; Install the uncruncher for LZSA1
	macro INSTALL_LZSA1
		uncrunch
		include once "inner://unlzsa1_fast.asm"
		DecompressLZSA1(void)
	endm

	;; Install the uncruncher for LZSA2
	macro INSTALL_LZSA2
		uncrunch
		include once "inner://unlzsa2_fast.asm"
		DecompressLZSA2(void)
	endm

	;; Install the uncruncher for shrinkler
	macro INSTALL_SHRINKLER
		include once "inner://deshrink.asm"
		uncrunch equ shrinkler_decrunch
		org probs + &800
	endm

	;; Install the uncruncher for zx0
	macro INSTALL_ZX0
		uncrunch
		include once "inner://dzx0_fast.asm"
		DecompressZX0()
	endm


	;; Install the uncruncher for zx0 backward
	macro INSTALL_ZX0_BACKWARD
		uncrunch
		include once "inner://uncrunch/dzx0_turbo_back.asm"
		DecompressZX0TurboBackward()
	endm

	;; Install the uncruncher for zx7
	macro INSTALL_ZX7
		uncrunch
		include once "inner://uncrunch/dzx7_turbo.asm"
	endm

	;;
	;; Load a data file and crunch it with the selected cruncher.
	;; The file is crunched with the selected cruncher at the label `label`
	;; Sub labels .start is synonyme, .next is the byte after last crunched byte, .length is the crunched size
	macro LOAD_N_CRUNCH label, fname
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
				LOAD_N_CRUNCH_WITH(LZEXO, {label}, {fname})
				break
			case CRUNCHER_APLIB
				LOAD_N_CRUNCH_WITH(LZAPU, {label}, {fname})
				break
			case CRUNCHER_UPKR
				LOAD_N_CRUNCH_WITH(LZUPKR, {label}, {fname})
				break
			case CRUNCHER_LZ4
				LOAD_N_CRUNCH_WITH(LZ4, {label}, {fname})
				break
			case CRUNCHER_LZ48
				LOAD_N_CRUNCH_WITH(LZ48, {label}, {fname})
				break
			case CRUNCHER_LZ49
				LOAD_N_CRUNCH_WITH(LZ49, {label}, {fname})
				break
			case CRUNCHER_LZSA1
				LOAD_N_CRUNCH_WITH(LZSA1, {label}, {fname})
				break
			case CRUNCHER_LZSA2
				LOAD_N_CRUNCH_WITH(LZSA2, {label}, {fname})
				break
			case CRUNCHER_SHRINKLER
				LOAD_N_CRUNCH_WITH(LZSHRINKLER, {label}, {fname})
				break
			case CRUNCHER_ZX0
				LOAD_N_CRUNCH_WITH(LZX0, {label}, {fname})
				break
			case CRUNCHER_ZX0_BACKWARD
				LOAD_N_CRUNCH_WITH(LZX0_BACKWARD, {label}, {fname})
				break
			case CRUNCHER_ZX7
				LOAD_N_CRUNCH_WITH(LZX7, {label}, {fname})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm

	;; Uncrunch data from {from} to {to} with the selected cruncher
	;; Parameters:
	;; - from: start address of the crunched data (the very first byte). It is better to use a label (with its sublabels) than an address
	;; - to: start address where the uncrunched data will be stored (the very first byte)
	macro UNCRUNCH from, to
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
			case CRUNCHER_APLIB:
			case CRUNCHER_LZ48:
			case CRUNCHER_LZ49:
			case CRUNCHER_LZSA1:
			case CRUNCHER_LZSA2:
			case CRUNCHER_ZX0:
			case CRUNCHER_ZX7:
				UNCRUNCH_STANDARD_NOT_BACKWARD({from}, {to})
				break
			case CRUNCHER_ZX0_BACKWARD:
				UNCRUNCH_STANDARD_BACKWARD({from}, {to})
				break
			case CRUNCHER_UPKR:
				UNCRUNCH_UPKR({from}, {to})
				break
			case CRUNCHER_LZ4:
				UNCRUNCH_LZ4({from}, {to})
				break
			case CRUNCHER_SHRINKLER
				UNCRUNCH_SHRINKLER({from}, {to})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm



	;; Indirect uncrunch data from {from} to {to} with the selected cruncher
	;; Parameters:
	;; - moved_from: address where the crunched data has been moved
	;; - from: start address of the crunched data (the very first byte) was initially before being moved. It is better to use a label (with its sublabels) than an address
	;; - to: start address where the uncrunched data will be stored (the very first byte)
	;;
	;; TODO: implement all the case. ATM I have only implemented what I used
	macro INDIRECT_UNCRUNCH moved_from, from, to
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
			case CRUNCHER_APLIB:
			case CRUNCHER_LZ48:
			case CRUNCHER_LZ49:
			case CRUNCHER_LZSA1:
			case CRUNCHER_LZSA2:
			case CRUNCHER_ZX0:
			case CRUNCHER_ZX7:
				INDIRECT_UNCRUNCH_STANDARD_NOT_BACKWARD({moved_from}, {from}, {to})
				break
			case CRUNCHER_ZX0_BACKWARD:
				INDIRECT_UNCRUNCH_STANDARD_BACKWARD({moved_from}, {from}, {to})
				break
			case CRUNCHER_UPKR:
				INDIRECT_UNCRUNCH_UPKR({moved_from}, {from}, {to})
				break
			case CRUNCHER_LZ4:
				INDIRECT_UNCRUNCH_LZ4({moved_from}, {from}, {to})
				break
			case CRUNCHER_SHRINKLER
				INDIRECT_UNCRUNCH_SHRINKLER({moved_from}, {from}, {to})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm

	;; Install the uncruncher for the selected cruncher
	macro INSTALL_UNCRUNCHER
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
				INSTALL_EXOMIZER()
				break
			case CRUNCHER_APLIB:
				INSTALL_APLIB()
				break
			case CRUNCHER_UPKR:
				INSTALL_UPKR()
				break
			case CRUNCHER_LZ4
				INSTALL_LZ4()
				break
			case CRUNCHER_LZ48
				INSTALL_LZ48()
				break
			case CRUNCHER_LZ49
				INSTALL_LZ49()
				break
			case CRUNCHER_LZSA1
				INSTALL_LZSA1()
				break
			case CRUNCHER_LZSA2
				INSTALL_LZSA2()
				break
			case CRUNCHER_SHRINKLER
				INSTALL_SHRINKLER()
				break
			case CRUNCHER_ZX0
				INSTALL_ZX0()
				break
			case CRUNCHER_ZX0_BACKWARD
				INSTALL_ZX0_BACKWARD()
				break
			case CRUNCHER_ZX7
				INSTALL_ZX7()
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
			ends
	endm

Full Source

Show Source
;;;
;;; Private part of HBL demosystem
;;; &e000-&ffff => demosystem space + bootstrap space
;;; &c000-&dfff => temporary area used to copy data in &4000 area of main memory

;;; demosystem space:
;;; &c000 > SP > &4000 => set to &C000
;;; &c000 > fname stuff < &40 => set to &40

;;;
;;; Tiny demosystem that only serves to load files using the firmware even
;;; after killing the firmware.
;;; Nothing more, nothing less.
;;;
;;; This must not be used directly by the user. 
;;; Assemble it, provide a binary to the user with the macro.asm file that acts as a public API
;;; Everything must be hidden and abstracted.
;;;
;;; ds_c1_XXX must be called from a &c1 context
;;;; ds_c2_XXX must be called from a &c2 context


    include once "public.asm"

__AMSDOS_STATIC_DATA_ADDRESS__ equ &be40
__AMSDOS_STATIC_DATA_SIZE__ equ &40
__AMSDOS_DYNAMIC_DATA_ADDRESS_PTR__ equ &be7d
__AMSDOS_DYNAMIC_DATA_SIZE__ equ &500
__FIRMWARE_DATA_START__ equ  &a800 ; b000 &b8b4  ;< here we try to collect as much as possible
__FIRMWARE_DATA_END__ equ &be00
__FIRMWARE_DATA_SIZE__ equ __FIRMWARE_DATA_END__ - __FIRMWARE_DATA_START__


__STACK_SIZE__ equ 2*40
__FIRMWARE_STORAGE_SIZE__ equ __FIRMWARE_DATA_SIZE__ + __AMSDOS_STATIC_DATA_SIZE__ + __AMSDOS_DYNAMIC_DATA_SIZE__


__DS_BUFFER_CAS_IN__ equ &170
__DS_FILENAME__ equ __DS_BUFFER_CAS_IN__
;;
; BUFFER TO THE LENGHT OF THE FILENAME
__DS_FILENAME_SIZE__ EQU __DS_FILENAME__ + 256
;;
; LOADING ADDRESS
__DS_LOAD_ADDRESS__ EQU __DS_FILENAME_SIZE__ + 1
__DS_FNAME_BUFFER_SIZE EQU (__DS_LOAD_ADDRESS__+2) - __DS_BUFFER_CAS_IN__

__DS_TRUE_FIRST_AVAILABLE_ADDRESS equ __DS_FNAME_BUFFER_SIZE + __DS_BUFFER_CAS_IN__
assert __DS_TRUE_FIRST_AVAILABLE_ADDRESS <= DS_FIRST_AVAILABLE_ADDRESS

__DS_STACK__ equ &C000
__COPY_BUFFER__ equ &c000
__COPY_BUFFER_SIZE__ equ &2000

__MODE_NUMBER_PTR_6128__ equ 0xB7C3
__MODE_NUMBER_PTR_464__ equ 0xB1C8

__DS_DEVICE_UNSET__ equ 0
__DS_DEVICE_FLOPPY_DRIVE__ equ 1
__DS_DEVICE_ALBIREO_LIKE__ equ 2

MAKE_FIRMWARE_SILENT equ false

    ;;
    ;; Save the stack from the main program, 
    ;; then switch to the demosystem one
    ;; Must be called from &C1
    ;; Modified :
    ;;  - SP
    ;;  - 1 word at (__ds_program_stack_backup__)
    macro __SWITCH_TO_BOOTSTRAP_STACK__
        ld (__ds_bootstrap_program_stack_backup__), sp
        ld sp, __ds_bootstrap_stack__ 
        assert __ds_bootstrap_stack__ > &C000; "The stack needs to be in the same space has we do not force the use of DI"
    endm

    macro __SWITCH_TO_DS_STACK__
        ld (__ds_demosystem_bootstrap_stack_backup__), sp
        ld sp, __DS_STACK__ 
        assert __DS_STACK__ <= &C000 && __DS_STACK__ >= &4000
    endm

    ;;
    ; Stop to use the system stack and go back to the program stack
    ; Must be called from &C1
    macro __SWITCH_TO_PROG_STACK__
        ld sp, (__ds_bootstrap_program_stack_backup__)
    endm

    ;;
    ;; Select the full C2 memory space
    ;; Be careful, di must be set to avoid crash if there is not ei:ret or whatever in 0x38
    macro __DS_SELECT_DS_FULL_SPACE__
        DS_SELECT_A_MEMORY_SPACE(DS_FULL_SPACE_GA)
    endm


    ;;
   ; ; This macro works when system has been saved
    macro __DS_FIRMWARE_CHECK_IF_FLOPPY_DRIVE__
        __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__()
        neg
    endm

    macro __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__
        ld a,(&be5f)
        or a
    endm


    ;;
    ;; Reset the basic timer.
    ;; MOD:
    ;;  - HL
    macro DS_PRIVATE_RESET_TIMER
        if USE_BASIC_TIMER
            ld hl, 0
            ld (&b8b4), hl
        endif
    endm
    
    ;;
    ;; Get the basic timer (i.e. number of halts since last reset)
    macro DS_PRIVATE_COLLECT_TIMER_IN reg16
        if USE_BASIC_TIMER
            ld {reg16}, (&b8b4)
        endif
    endm

    ;;
    ;; send a code and its 16bits value to the cpc booster
    ;; modified: A, BC
    ;; precondition: {reg16} != BC, {reg16} != AF
    macro DS_PRIVATE_BOOSTER_COMMUNICATION code, reg16
        if USE_CPCBOOSTER
            LD BC, BOOSTER_COMMUNICATION_PORT
            ld a, {code}
            out (c), a
            out (c), {reg16}.low
            out (c), {reg16}.high
        endif
    endm


    DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_SIZE equ 1
    DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_HALTS equ 2


    ;;
    ;; Demosystem is store in 0xe000-0xf000
    org __DS_FILE_LOADING_ROUTINE__

    assert $ >= __COPY_BUFFER__ + __COPY_BUFFER_SIZE__

    assert $ == __DS_FILE_LOADING_ROUTINE__    : jp ds_c1_load_file
    assert $ == __DS_BACKUP_FIRMWARE_ROUTINE__ : jp ds_c1_backup_firmware 
    assert $ == __DS_SAVE_SCREEN_MODE__        : jp ds_c1_save_screen_mode
    assert $ == __DS_COPY_FROM_EXTRA_TO_MAIN__ : jp ds_c1_copy_from_extra_to_main_over_buffer

;;
;; This function MUST be called when being in bootstrap space c1.
;; It restores the firmware, load the file, save the firmware, kill it.
;; Input
;;   - HL = filename
;;   - DE = address
;;   - B = size of the filename
;;     C = options of loading
;; Output
;; BC: lenght of the file
;; DE: expected destination of the file
ds_c1_load_file

    ; no modification HL/BC
    __SWITCH_TO_BOOTSTRAP_STACK__()

    ; Save file-handling data in bootstrap memory 

    ; Save the loading option
        ld a, c : ld (.option), a

     ; Save the filename size
    .copy_filename_size
        ld a, b : ld (__ds_bootstrap_filename_size__), a

        ; Save the load address
    .save_load_address
        ld (__ds_bootstrap_load_address__), de

        ; copy the filename before it is not anymore available
        ; we do not care of the realsize
    .copy_filename
        ld de, __ds_bootstrap_filename__
        ld c, b : ld b, 0
        ldir

.enter_demosystem_space
    di
        __DS_SELECT_DS_FULL_SPACE__()
        __SWITCH_TO_DS_STACK__()
        ; here we are in the full space of the demossytem
        call ds_c2_restore_firmware
        call ds_c2_clean_firmware_state
    ei
    

    ; set motor drive on if needed
    __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__()
    jr z, .after_motor_on
    ld a, (.option)
    and ~DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON
    jr z, .after_motor_on
.set_motor_on
    ld bc, 0xFA7E : out (c), c ; open motor drive
    ; wait a bit to obtain a full speed
    repeat 5
        call ds_c1_wait_secured_vsync
    endr
.after_motor_on

    ; copy file loading information
    ld hl, __ds_bootstrap_filename__
    ld de, __DS_FILENAME__
    ld bc, __DS_FNAME_BUFFER_SIZE
    ldir
    
    call ds_c2_load_file_impl : ld (.file_size), bc
    ; XXX Do not touch DE or backup it until the end of the execution
    ; call ds_c2_backup_frimware  ; XXX it would be nice toreactivate that


    ; set motor drive off if needed
    __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__()
    jr z, .after_motor_off
    ld a, (.option)
    and ~DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF
    jr z, .after_motor_off
.set_motor_off
    ld bc, 0xFA7E : out (c), 0  ;  motor off
.after_motor_off



    di
        DS_SELECT_DS_BOOTSTRAP_SPACE()
    ; here we are in the bootstrap space ...
        __SWITCH_TO_PROG_STACK__()
    ; ... with the program stack
    ei

    ld bc, 0 : .file_size equ $-2
    ret
.option db 0

;;
; Save the current screen mode
; Input: A screen mode in Gate Array notation
ds_c1_save_screen_mode
    ld (__ds_screen_mode__), a
    ret

;;
;; Copy a huge block from extra memory to main memory
;; Restrictions:
;;   - source address < &c000
;;   - destination address > &40
;;   - destination address + nb_bytes < &8000
;; Input:
;; - HL: Adress in extra page
;; - DE: Adress in main page 
;; - BC: number of bytes to copy
ds_c1_copy_from_extra_to_main_over_buffer
    BREAKPOINT
    __SWITCH_TO_BOOTSTRAP_STACK__()

.handle_current_bloc
    ld a, b : or c
    jr z, .copy_completed ; we have finished to copy

    ;; Check if we have to copy more than &2000 bytes
    ;; (the size of the temporary buffer)
    push hl
        ld hl, __COPY_BUFFER_SIZE__
        or a : sbc hl, bc
    pop hl
    jr c, .needs_an_intermediate_copy ; we have an intermediate &2000 bytes copy

    ; here we have &2000 or less bytes to copy

    ; here we know it is the very last copy
    ; BC<=__COPY_BUFFER_SIZE__
.last_bloc_copy
    call .copy_one_bloc
.copy_completed
    __SWITCH_TO_PROG_STACK__()
    ret

.needs_an_intermediate_copy
    push bc

        ; copy a bloc of &2000 bytes
        push de, hl
            ld bc, __COPY_BUFFER_SIZE__
            call .copy_one_bloc
        pop hl, de

        ; compute values for next bloc
        ; add &2000 to src and tgt
        ld bc, __COPY_BUFFER_SIZE__
        add hl, bc
        ex de, hl : add hl, bc : ex de, hl
    
    pop bc
    
    ; Remove &2000 to bc
    push hl
        ld hl, bc
        ld bc, __COPY_BUFFER_SIZE__
        or a : sbc hl, bc
        ld bc, hl
    pop hl
    jr .handle_current_bloc

    ;;
    ; Copy in main memory over the proxy of the 2k buffer
    ; 
    ; Input
    ; - HL: src in C2 space
    ; - DE: dst in C1 space
    ; - BC number of bytes to copy <= &2000
.copy_one_bloc

    di
        ; Swith to C2 space
        push bc
            ld bc, 0x7fc2 : out (c), c
        pop bc

        ; copy the appropriate amount of bytes
        ; hl, bc have the right value
        ; de is used at the 2nd step
        push de, bc
            ; copy to the temporary buffer
            ld de, __COPY_BUFFER__
            ldir

            ; Switch back to C1 space
            ld bc, 0x7fc1 : out (c),c 
        pop bc, de

        ; copy to the main memory
        ld hl, __COPY_BUFFER__
        ldir
    ei
    ret





;;
;; Backup the original CPC firmware that is in main memory or this system
;; that is in extra memory and used by the demo.
;; As this is stricly the same code, there is nothing to do
;; Interruption have to be cut
ds_c1_backup_firmware
ds_c2_backup_frimware

    ; All code is in &C000, we cannot write here
    call ds_c1_make_firmware_quiet
    di ; XXX remove ?

    ; Désactivation la ROM firmware
    ld bc, (__ds_screen_mode__) : ld b, &7f; here c is supposed to contains the screen mode
    out (c),c

    ld de, __ds_save_buffer__

    ; Données du Kernel et des indirections
    ld hl, __FIRMWARE_DATA_START__
    ld bc, __FIRMWARE_DATA_SIZE__
    ldir

    ; Données statiques de l'Amsdos
    ld hl, __AMSDOS_STATIC_DATA_ADDRESS__
    ld bc, __AMSDOS_STATIC_DATA_SIZE__
    ldir

    ; Données dynamiques de l'Amsdos
    ld hl, (__AMSDOS_DYNAMIC_DATA_ADDRESS_PTR__)
    ld bc, __AMSDOS_DYNAMIC_DATA_SIZE__
    ldir


    ; Registres secondaires utiles au Kernel
    ld ixh,d
    ld ixl,e
    ex af,af'
            ld (de),a
            exx
                    ld (ix+1),b
                    ld (ix+2),c
            exx
    ex af, af'

    ret



ds_c1_make_firmware_quiet
ds_c2_make_firmware_quiet
        ; Coupe tout son et on s'assure qu'aucun
        ; évènement sonore est en cours de traitement
        call &bca7 ; SOUND RESET
        ; Purge de tout appui de touche en cours de traitement
        call &bd3d ; KM FLUSH
        ; Désactive complètement de la gestion du clavier
        ld a,&c9 ; RET
        ld (&bdf4),a ; KM SCAN KEYS
        ; Désactive les messages d'erreur disquette
        ; de cette façon, les erreurs ne sont plus bloquantes
        ; et les messages d'erreur ne sont plus affichés
        ld a,&ff ; &ff = Désactivé
        ld (&be78),a
        ; Désactive le clignotement des couleurs
        ld hl,&b7f9 ; HL = Event block des couleurs
        call &BCDD ; KL_DEL_FRAME_FLY
        ; Désactive tout affichage (au cas où)
        jp &BB57 ; TXT_VDU_DISABLE

;;
;; Restore the demosystem in C2 space.
;; Need to be called from the C2 space too.
;; No input is required
;; Interruptions have to be cut here
ds_c2_restore_firmware

    ; Activation la ROM firmware
    ld a, (__ds_screen_mode__) : and %11111011
    ld b,&7f : out (c),a


    ; Recopie les primitives du Kernel vers la RAM
    push de
        ld hl,0
        ld de,0
        ld bc,&40
        ldir
    pop hl

    ; Désactivation de la ROM firmware
    ;ld bc,&7f8e : out (c),c
    ld bc, (__ds_screen_mode__) : ld b, &7f
    out (c),c

    ld hl, __ds_save_buffer__

    ; Firmware data and indirections
    ;ld hl,FirmwarePackAddress ; Already set
    ld de, __FIRMWARE_DATA_START__
    ld bc, __FIRMWARE_DATA_SIZE__
    ldir

    ; Données statiques de l'Amsdos
    ld de, __AMSDOS_STATIC_DATA_ADDRESS__
    ld bc, __AMSDOS_STATIC_DATA_SIZE__
    ldir

    ; Données dynamiques de l'Amsdos
    ld de,(__AMSDOS_DYNAMIC_DATA_ADDRESS_PTR__)
    ld bc, __AMSDOS_DYNAMIC_DATA_SIZE__
    ldir


    ; Override screen mode
    ld a, (__ds_screen_mode__) : and %11
    ld (__MODE_NUMBER_PTR_6128__), a ; TODO write a OS agnostic version

    ; Registres secondaires utiles au Kernel
    ld a,(hl)
    inc hl
    ld b,(hl)
    inc hl
    ld c,(hl)
    exx
    ex af,af'



    ret


ds_c1_wait_secured_vsync
ds_c2_wait_secured_vsync
    ld b, 0xf5
.vsync
    in a, (c)
    rra
    jr nc, .vsync

.novsync
    in a, (c)
    rra
    jr nc, .novsync
    ret

ds_c2_clean_firmware_state
    ; XXX
    ; here we have a limitation: we cannot pre-open a file as Toms was doing initially
    ld hl, &b11a : ld (hl),0 ;  ; mise à 0 du flag indiquant que un fichier est ouvert, sinon cas_in_open retourne un code d'erreur 0e (peut-être seulement si on charge depuis une cassette)
    
    call &bcc8 ; kl_choke_off, remet à 0 la liste des timers pour être dans un état propre

    ld a, (__ds_screen_mode__)
    ld b, 0x7f : out (c), a
    ld (__MODE_NUMBER_PTR_6128__), a ; XXX maybe not usefull
    and %11 : call &bd1c ; MC_SET_MODE
    
    ret

    if false // no need in our project
        ;;
;; Restauration complète du firmware préalablement sauvegardé via BackupFirmware
;; (tous les modules sont de nouveau utilisables, sauf les RSX)
;;
RestoreFullFirmware
        call RestoreFirmware
        call &bca7 ; SOUND RESET
        call &bb00 ; KM INITIALISE
        call &bb4e ; TXT INITIALISE
        call &bbba ; GRA INITIALISE
        call &bbff ; SCR INITIALISE
        call &bc64 ; CAS INITIALISE
        ; Reinstall CAS indirections which where
        ; just destroyed by CAS INITIALISE
        ld hl,FirmwarePackAddress+FirmwareDataStart-&bc77
        ld de,&bc77
        ld bc,13*3
        ldir
        ; Réactive les messages d'erreur disquette
        ld a,0 ; 0 = Activé
        ld (&be78),a

        ret
    endif


;;
; Really does the file loading after having everyhing prepared
; Output: BC: file size
ds_c2_load_file_impl

        ei

        ; Open the file
        ld hl, __DS_FILENAME__
        ld a, (__DS_FILENAME_SIZE__) : ld b, a
        ld de, (__DS_LOAD_ADDRESS__)
        call &bc77 // cas in open
        jr nc, .open_error
        jr z, .open_error

        ; BC contains the length of the loaded file
        ld a, b : cp c : jr z, .ascii_error ; ascii file is not handled
        ld (.file_size), bc

        if USE_CPCBOOSTER
            ld hl, bc
            DS_PRIVATE_BOOSTER_COMMUNICATION DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_SIZE, HL
        endif
        DS_PRIVATE_RESET_TIMER()

        ; Load the file
        ld hl, (__DS_LOAD_ADDRESS__) // XXX we ignore the header load address
        call &bc83 // cas in direct
        jr nc, .load_error
        jr z, .load_error



        ; Close the file
        call &bc7a // cas in close
        jr c, .ok
.close_error
    ld a, 0x5c ; red
    jr .error
.ascii_error
    ld a, 0x4e ; orange
    jr .error
.open_error
    ld a, 0x4c ; red
    jr .error
.load_error
    ld a, 0x40 ; gray
    ; jr .error
.error
        di
        if !MAKE_FIRMWARE_SILENT
            ld bc, 0xbc00 + 1 : out (c), c
            ld bc, 0xbd00 + 0 : out (c), c
            ld bc, 0x7f10 : out (c), c
            out (c), a
        endif
        jp $
.ok

        DS_PRIVATE_COLLECT_TIMER_IN HL
        DS_PRIVATE_BOOSTER_COMMUNICATION DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_HALTS, HL

        ; TODO add a halt for albireo

        ld hl, &c9fb
        ld (&38), hl

        ld bc, 0 : .file_size equ $-2
        ret



;;
; Screen mode in gate array space &8c, &8d, &8e
__ds_screen_mode__ db &8e


;;; ======== No more code must be added here =============
;;

;:
; buffer for the filename to load
__ds_bootstrap_filename__ 
;;
; buffer to the lenght of the filename
__ds_bootstrap_filename_size__ equ __ds_bootstrap_filename__ + 256 ; we can handle filenames of 256 bytes
;;
; loading address
__ds_bootstrap_load_address__ equ __ds_bootstrap_filename_size__ + 1
;;
; Storage to store the caller stack
__ds_bootstrap_program_stack_backup__  equ __ds_bootstrap_load_address__  + 2
__ds_demosystem_bootstrap_stack_backup__ equ __ds_bootstrap_program_stack_backup__ + 2
;;
; Storage to save the firmware stuff
; Can be accessed in 0xC1, 0xc2 space directly
; Can be accessed in 0xc7 space after removing 0x8000 to the address
__ds_save_buffer__ equ __ds_demosystem_bootstrap_stack_backup__ + 2
__ds_save_buffer_end__ equ __ds_save_buffer__ + __FIRMWARE_STORAGE_SIZE__

FirmwarePackAddress equ __ds_save_buffer__ ; TODO remove this line ASAP

;;
; The demosystem uses its own stack
; We still need to define a proper size
__ds_bootstrap_stack__ equ __ds_save_buffer_end__ + __STACK_SIZE__
    assert $
    assert $>0x0000, "You wrap memory, demosystem is too large or loaded to high"


print "DS SAVE_BUFFER: [", {hex}__ds_save_buffer__, "-", {hex}(__ds_save_buffer_end__-1), "]" 

Full Source

Show Source
;;
;; public part of HBL demosystem
;; Macros to use the the demosystem.
;; Here most thing are ultra specific to the demosystem
;;
;; This one targets a file loading with the firmware.
;; So not really usable in a huge demo

    include "common.asm"
    include "demosystem_config.asm"
    include "booster.asm"

DS_MAIN_SPACE_GA equ 0xc0
DS_BOOTSTRAP_DS_SPACE_GA equ 0xc1
DS_FULL_SPACE_GA equ 0xc2

DS_LOADER_OPTION_NONE equ 0
DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON equ (1<<0)
DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF equ (1<<1)


__DS_FILE_LOADING_ROUTINE__    equ &e000 + 0*3
__DS_BACKUP_FIRMWARE_ROUTINE__ equ &e000 + 1*3
__DS_SAVE_SCREEN_MODE__         equ &e000 + 2*3
__DS_COPY_FROM_EXTRA_TO_MAIN__ equ &e000 + 3*3

DS_LOAD_ADDRESS equ __DS_FILE_LOADING_ROUTINE__
DS_LOAD_ADDRESS_FROM_DEMO_SPACE = DS_LOAD_ADDRESS % 0x4000 + 0x4000 ; Convert the address in the demo space


;; The minmum address available to load a file in the main memory.
DS_FIRST_AVAILABLE_ADDRESS equ &300
__DS_FIRST_BANK_SIZE__ equ &4000 - DS_FIRST_AVAILABLE_ADDRESS ; The maximum number of bytes avaialble in the first bank

;;
;; This macro should be called at the very beginning of the demo.
;; it aims at checking the kind of device use to load
macro DS_INITIALIZATION
    DS_PRIVATE_CPCBOOSTER_INIT_COMMUNICATION() ; setup the booster if flag activated
    DS_BACKUP_FIRMWARE()
endm


;;
;; Select a memory space for the demo
;; Completly relocatable code
macro DS_SELECT_A_MEMORY_SPACE space
    assert {space} >= 0xC0 and {space} <= 0xc7
    ld bc, &7f00 + {space} : out (c),c  
endm

macro DS_SELECT_DS_BOOTSTRAP_SPACE
    DS_SELECT_A_MEMORY_SPACE(DS_BOOTSTRAP_DS_SPACE_GA)
endm

macro DS_SELECT_MAIN_SPACE
    ; TODO allow to select a different bank
    DS_SELECT_A_MEMORY_SPACE(DS_MAIN_SPACE_GA)
endm

macro DS_SAVE_SCREEN_MODE mode
    assert {mode} == &8c || {mode} == &8d || {mode} == &8e
    di
        DS_SELECT_DS_BOOTSTRAP_SPACE() 
        ld a, {mode}
        call __DS_SAVE_SCREEN_MODE__
        DS_SELECT_MAIN_SPACE()
    ei
endm

;;
;; Request the demosystem to load a file.
;; This macro must be called when being in space &c0
;; The process to load a file is the following:
;; - memory conf. in &C1
;; - restore the system
;; - memory conf in &C2
;; - load the file
;; - backup the system
;; - memory conf in C1
;; - restore the normal stack
;; - memory conf in &C0
;;
;; In case of failure the program is stucked
;; In case of success:
;;  - page 1 contains the loaded file
;;  - bc contains the length of the file
;;  - de contains the expected destination of the file
;;
;; Input:
;;  - filename: address to the filename
;;  - address: loading address IN THE EXTRA page
macro DS_LOAD_FILE_IN_EXTRA_PAGE filename, filename_size, address, loading_options
    __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__({filename}, {filename_size}, {address}, true, {loading_options})
endm

;;
;; Private macro. Do not use directly
;; Load a file and optionnaly restore &C0
macro __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__ filename, filename_size, address, restore_bank, loading_options

    assert {filename} < 0xC000, "The filename cannot be in the address space [&C000-&FFFF] because we switch of bank"

    ; TODO add memory check to ensure we do no load in restricted areas

    assert $<0xC000, "You cannot be here as we will switch in &C1 and &C2 configurations" ; TODO use a real filtering adress bacause we do not have to be so pedantic
    assert {filename_size} > 0, "You need a file name"

    DS_SELECT_DS_BOOTSTRAP_SPACE() 

        ld hl, {filename}
        ld de, {address}
        ld bc, {filename_size}*256 + {loading_options}
        call DS_LOAD_ADDRESS

    if {restore_bank}
        push bc
            DS_SELECT_MAIN_SPACE()
        pop bc
    endif
endm

;;
;; Load first the file in extra page.
;; Once done, move it, in the main memory.
;; This is a slow process as each byte has to pass over a buffer
;; TODO handle a fast copy for bytes NOT in &4000-&7fff space as they can skip the buffer
;; TODO handle case where the memory is overriden by the loaded file
macro DS_LOAD_FILE_IN_MAIN_PAGE filename_addr, filename_size, load_address, loading_options
    ; Load the file and stay in the extra memory configuration
    __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__({filename_addr}, {filename_size}, DS_FIRST_AVAILABLE_ADDRESS, false, {loading_options})
    
    ; By construction BC contains the number of byte read
    ld hl, DS_FIRST_AVAILABLE_ADDRESS
    ld de, {load_address}
    call __DS_COPY_FROM_EXTRA_TO_MAIN__

    DS_SELECT_MAIN_SPACE()

endm

;;
;; Load first the file in extra page.
;; Once done, move it, in the main memory.
;; This is a slow process as each byte has to pass over a buffer.
;; Then launch it
;; TODO handle a fast copy for bytes NOT in &4000-&7fff space as they can skip the buffer
;; TODO handle case where the memory is overriden by the loaded file
macro DS_LOAD_AND_RUN_FILE_IN_MAIN_PAGE filename, filename_size, load_address, exec_address, loading_options

    DS_LOAD_FILE_IN_MAIN_PAGE( {filename}, {filename_size}, {load_address}, {loading_options})
    jp {exec_address}
	assert $<={load_address}

endm



;;
;; Ensure the demosystem will not write anywhere
;; It is probably mandatory using C1 as any print will destroy the demosystem
macro DS_MAKE_FIRMWARE_QUIET
    di

        ; Coupe tout son et on s'assure qu'aucun
        ; évènement sonore est en cours de traitement
        call &bca7 ; SOUND RESET
        ; Purge de tout appui de touche en cours de traitement
        call &bd3d ; KM FLUSH
        ; Désactive complètement de la gestion du clavier
        ld a,&c9 ; RET
        ld (&bdf4),a ; KM SCAN KEYS
        ; Désactive les messages d'erreur disquette
        ; de cette façon, les erreurs ne sont plus bloquantes
        ; et les messages d'erreur ne sont plus affichés
        ld a,&ff ; &ff = Désactivé
        ld (&be78),a
        ; Désactive le clignotement des couleurs
        ld hl,&b7f9 ; HL = Event block des couleurs
        call &BCDD ; KL_DEL_FRAME_FLY
        ; Désactive tout affichage (au cas où)
        call &BB57 ; TXT_VDU_DISABLE

    ei
endm


;;
;; Copy something loaded in the extra memory into the main memory
macro DS_COPY_MEMORY_FROM_EXTRA_PAGE_TO_MAIN_PAGE from, to, page, size

    @from_until = {from} + {size}
    @to_until = {to} + {size}

    assert {from} >= 0x4000 and {from} < 0x8000 and  @from_until >= 0x4000 and @from_until < 0x8000, "You can copy at maximum 0x4000 bytes, from [0x4000;0x8000["
    assert ({to} < 0x4000 || {to} >= 0x8000) and (@to_until < 0x4000 || @to_until >= 0x8000), "You can paste only outside of [0x4000;0x8000["


    DS_SELECT_A_MEMORY_SPACE({eval}{page})

    ld bc, {size}
    ld de, {to}
    ld hl, {from}
    ldir

    DS_SELECT_MAIN_SPACE()
    

endm

;;
;; Backup the firmware.
;; Has to be called one time at the beginning of the demo.
macro DS_BACKUP_FIRMWARE
    DS_SELECT_DS_BOOTSTRAP_SPACE() 
        di
            call __DS_BACKUP_FIRMWARE_ROUTINE__
        ei
    DS_SELECT_MAIN_SPACE()
endm

Full Source

Show Source
GREET_IDX set 0

	macro GREETINGS_NEXT content



		GREET_IDX set GREET_IDX +1
        db CHAR_CTRL_PEN
		if GREET_IDX % 2 == 0
			db 2

            if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT
                db {content}
                repeat  40 - string_len({content})
                    db ' '
                endr
            else if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT_CENTERED
                repeat 20
                    db ' '
                endr
                db {content}
                repeat 40-20-string_len({content})
                    db ' '
                endr
            endif
		else
			db 1

            if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT
                repeat 40 - string_len({content})
                    db ' '
                endr
                db {content}
            else if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT_CENTERED
                repeat 20 - string_len({content})
                    db ' '
                endr
                db {content}
                repeat 20
                    db ' '
                endr
            endif
		endif

        if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_CENTERED
            ; just to slow down
            repeat (40-string_len({content}))/2
                db ' '
            endr
            db {content}
            repeat (40-string_len({content}))/2
                db ' '
            endr
        endif

	repeat 40
        db ' '
    endr
    db 10,13
	endm

greetings
    db CHARS_CTRL_LOCATE(1, 25)
    GREETINGS_NEXT("Amstariga")
     GREETINGS_NEXT("Arkos")
     GREETINGS_NEXT("Artline Designs")
     GREETINGS_NEXT("Batman Group")
     GREETINGS_NEXT("Bonzai")
     GREETINGS_NEXT("Booze Design")
     GREETINGS_NEXT("Censor Design")
     GREETINGS_NEXT("Checkpoint")
     GREETINGS_NEXT("Cngsoft")
     GREETINGS_NEXT("Condense")
     GREETINGS_NEXT("Crack'n Rom")
     GREETINGS_NEXT("DBT")
     GREETINGS_NEXT("Dead Hackers Society")
     GREETINGS_NEXT("Dekadence")
     GREETINGS_NEXT("Desire")
     GREETINGS_NEXT("Dirty Minds")
     GREETINGS_NEXT("Dreamweb")
     GREETINGS_NEXT("Extend")
     GREETINGS_NEXT("Fairlight")
     GREETINGS_NEXT("Fit")
     GREETINGS_NEXT("Flush")
     GREETINGS_NEXT("Futurs'" )
     GREETINGS_NEXT("Ghostown")
     GREETINGS_NEXT("GPA")
     GREETINGS_NEXT("Hooy Program")
     GREETINGS_NEXT("Keops")
     GREETINGS_NEXT("Impact")
     GREETINGS_NEXT("Mysticall")
     GREETINGS_NEXT("Offense")
     GREETINGS_NEXT("Olympian")
     GREETINGS_NEXT("Onslaught")
     GREETINGS_NEXT("Overlanders")
     GREETINGS_NEXT("Overflow")
     GREETINGS_NEXT("Oxygene")
     GREETINGS_NEXT("phObos team")
     GREETINGS_NEXT("Pulpo Corrosivo")
     GREETINGS_NEXT("Praline")
     GREETINGS_NEXT("Shinra")
     GREETINGS_NEXT("SMFX")
     GREETINGS_NEXT("SymbiosiS")
     GREETINGS_NEXT("TEK")
     GREETINGS_NEXT("The Overlanders")
     GREETINGS_NEXT("Vanity")
     GREETINGS_NEXT("Vital-Motion!")
     GREETINGS_NEXT("and the groupless BND coding party participants!")


    db 0

Full Source

Show Source
;;
; Loader for the HBL demo
; Krusty/Benediction, 09/2025

	include 'src/demosystem/basic_macros.asm'
    include 'src/demosystem/public.asm'
    include 'src/demosystem/chars_control.asm'
    include 'src/demosystem/chars_name.asm'
	include 'inner://firmware/scrpack.asm'
    include 'inner://firmware/txtvdu.asm'


SKIP_AMSDOS_LEAVING equ false
SKIP_INTRODUCTION equ false
SKIP_POLAR_DOTS equ false

GREETINGS_TEXT_CENTERED equ  0
GREETINGS_TEXT_LEFT_RIGHT equ 1
GREETINGS_TEXT_LEFT_RIGHT_CENTERED equ 2

GREETINGS_TEXT_LAYOUT equ GREETINGS_TEXT_LEFT_RIGHT_CENTERED

REDEFINE_FONT equ true

	LOCOMOTIVE start_hbl
HIDE_LINES 60,70
10 ' HBL - Horny Bytes Lovers - HBL
20 ' NOT Released at the Benediction Coding Party #5 :(
30 ' (c) 2025,2026 Benediction
40 ' Credits
41 ' -------
42 ' # Introduction
43 '  - Z80: Eliot
44 '  - GFX: VinZ
45 '  - SFX: Warlord
46 ' # Outer Polar Space
47 '  - Z80: Krusty
48 '  - CRTC: Eliot
49 '  - GFX: Voxfreax
50 '  - SFX: Warlord
51 ' # Make it Easy
52 '  - Z80&CRTC: Eliot
53 '  - GFX: Voxfreax
54 '  - SFX: Warlord
55 ' # Linking
56 '  - Z80: Krusty
57 '  - GFX: Voxfreax
60 call {start_hbl}
70 ' should be hidden too'
	ENDLOCOMOTIVE


;;
;; Request to print a formatted string located at address in HL
;; XXX It seems to not work if some code are 0
macro PRINT_FORMATTED_STRING_FROM_HL
	rst #18
	dw rst_18_params
endm
 
 
start_hbl
	; ensure the basic line is secure to be read
	call ds_secure_basic_line

.handle_crtc_version
	; check if the user force a CRTC version
	call ds_basic_get_crtc_selection
	call nz, crtc_detection  ; automatic detection if user does not force
	ld i,a  ; <= backup crtc value in I register. Can be used with any part

	; set crtc 0 in case of wrong value
.handle_wrong_crtc_value
	cp 5
	jr c, .store_crtc_version
	xor a ; reset to 0
.store_crtc_version
	add a
	ld (.crtc_version_x2), a  ; store the CRTC value *2


.handle_selected_part
	; if there is no arguments in the basic line, just execute leave amsdos
	call ds_basic_first_comment_char_address
	jr nz, .execute_leave_amsdos



	; check if the user force a part to load
	DS_BASIC_GET_PARAM("PART")
	jr nz, .execute_leave_amsdos ; do not try handle the param
	DS_BASIC_PARAM_IS("INTRO")
	jp z, .install_demosystem



.execute_leave_amsdos

	if SKIP_AMSDOS_LEAVING
		jp .install_demosystem
	endif

	if REDEFINE_FONT

.setupfont

	ld de, 32; ' '
	ld hl, FONT_LOCATION
	call TXT_SET_M_TABLE

	ld hl, redefined_font.start
	ld de, FONT_LOCATION
	ld bc, redefined_font.length
	ldir
	endif


	; to be removed message ?
.clear_screen1
    ld hl, formatted_text1
	PRINT_FORMATTED_STRING_FROM_HL()

.setupcolors
	ld a, 0 : ld bc, 0*256 + 0 : call SCR_SET_INK
	ld bc, 0 :  call SCR_SET_BORDER
	ld a, 1 : ld bc, 2*256 + 5 : call SCR_SET_INK
	ld a, 2 : ld bc, 6*256 + 7 : call SCR_SET_INK
	ld a, 3 : ld bc, 4*256 + 4 : call SCR_SET_INK




	/* for one char
     LD A,240  ;; Setup Symbol Table - A Holds Character value
     LD HL,ship1  ;; HL points to Symbol Data to Define to
     CALL &BBA8  ;; Firmware routine to Redefine Symbol Table.
	*/

	ld hl, 5*255 + 20 : call SCR_SET_FLASHING
.print_text
    ld hl, formatted_credits
	PRINT_FORMATTED_STRING_FROM_HL()


	; print crtc message
.print_crtc_version
	ld de, 0 : .crtc_version_x2 equ $-2
	ld hl, crtc_table_text
	add hl, de
	ld e, (hl) : inc hl : ld d, (hl)
	ex de, hl
	PRINT_FORMATTED_STRING_FROM_HL()

	if false
		jp $
	else

	ld b, 5*50
.wait_loop
	push bc
	DS_SECURE_WAIT_VSYNC()
	pop bc
	djnz ,.wait_loop

	endif

.clear_screen2
    ld hl, formatted_text1
	PRINT_FORMATTED_STRING_FROM_HL()

.print_greetings
    ld hl, greetings
	PRINT_FORMATTED_STRING_FROM_HL()

.clear_screen3
    ld hl, formatted_text1
	PRINT_FORMATTED_STRING_FROM_HL()


	; install the demo-system in c7 bank
.install_demosystem
    ld bc, &7fc7 : out (c), c
	ld hl, start" class="symbol-link">demosystem_data.start
	ld de, DS_LOAD_ADDRESS_FROM_DEMO_SPACE
	ld bc, demosystem_data.size
	ldir


.setup_demosystem
    DS_SAVE_SCREEN_MODE(&8d)  ; Ensure we use the right screen mode
    DS_INITIALIZATION() ; Check the device and backup the system

.kill_system
    ld hl, 0xc9fb
    ld (0x38), hl

    ; TODO setup sp at a coherent address
    ld sp, 0x100

	jp intro_loader

	; TODO call the intro
/*
	; load next part
	ld hl, load_next_part
	ld de, 0x100
	ld bc, load_next_part_size
	ldir
	
	jp 0x100
	
load_next_part
	rorg 0x100
		;include "src/load_make_it_easy.asm"
		;include "src/load_outer_space.asm"
		include "src/load_outer_space_loader.asm"
	rend
load_next_part_size equ $ - load_next_part
*/

; The demosystem to move 0xC7
demosystem_data
.start
    incbin "demosystem.o"
.size = $-.start



;;
; everything here can be erased after the beginning
erazable_memory_zone    

include "src/demosystem/basic.asm"


rst_18_params
    DW #C38B
	db 0

formatted_text1
	; clear the screen progressively
	repeat 22
		db "          ", 10, 13 
	endr
	db CHARS_CTRL_SCREEN_MODE(1)
	db 0

	;db CHARS_CTRL_SCREEN_MODE(1) ; ensure we are in mode 1
	;db CHARS_CTRL_BORDER(0, 0)  does not work because there is a 0 ?
	;db CHARS_CTRL_PEN(0, 0, 0)
	;db CHARS_CTRL_PEN(1, 13, 13)
	;db CHARS_CTRL_PEN(2, 4, 4)
	;db CHARS_CTRL_PEN(3, 13, 13)

crtc_table_text
	dw crtc0_text
	dw crtc1_text
	dw crtc2_text
	dw crtc3_text
	dw crtc4_text


crtc0_string = "Last part works in degraded mode."
crtc1_string = "Everything is fine here."
crtc2_string = "Be ashamed to launch a demo! But it works of course ;)"
crtc3_string = "XXX"
crtc4_string = "XXX"	

crtc0_text db "CRTC 0", 10,13, CHARS_CTRL_SELECT_PEN(1),  CHARS_CTRL_LOCATE((40-string_len(crtc0_string))/2, 20), crtc0_string, 0
crtc1_text db "CRTC 1 ", 10,13,  CHARS_CTRL_SELECT_PEN(1),  CHARS_CTRL_LOCATE((40-string_len(crtc1_string))/2, 20), crtc1_string, 0
crtc2_text db "CRTC 2 ", 10,13, CHARS_CTRL_SELECT_PEN(1),  CHARS_CTRL_LOCATE((40-string_len(crtc2_string))/2, 20), crtc2_string, 0
crtc3_text db "CRTC 3 ", 10,13, CHARS_CTRL_SELECT_PEN(1),  CHARS_CTRL_LOCATE((40-string_len(crtc3_string))/2, 20), crtc3_string, 0
crtc4_text db "CRTC 4 ", 10,13, CHARS_CTRL_SELECT_PEN(1),  CHARS_CTRL_LOCATE((40-string_len(crtc4_string))/2, 20), crtc4_string, 0


formatted_credits

	db CHARS_CTRL_LOCATE((40-11)/2, 5)
 	db CHARS_CTRL_SELECT_PEN(2), CHAR_HEART
	db CHARS_CTRL_SELECT_PEN(1), "1995-2025"
	db CHARS_CTRL_SELECT_PEN(2), CHAR_HEART
    db CHARS_CTRL_SELECT_PEN(1), 10, 13


	db CHARS_CTRL_LOCATE((40-22)/2, 8)
    db CHARS_CTRL_SELECT_PEN(3),CHARS_CTRL_PRINT_SYMBOL(0x11), CHARS_CTRL_SELECT_PEN(1)
	db "30 years has passed..."
	db CHARS_CTRL_SELECT_PEN(3), CHARS_CTRL_PRINT_SYMBOL(0x14), CHARS_CTRL_SELECT_PEN(1), 10, 13 

	db CHARS_CTRL_LOCATE((40-37)/2, 9)
	db "CPC is dead but ",
	db CHARS_CTRL_SELECT_PEN(2), "BND", CHARS_CTRL_SELECT_PEN(1)
	db " is still alive!"

	db CHARS_CTRL_LOCATE((40-17)/2, 13), CHARS_CTRL_SELECT_PEN(3),  0xF8, CHARS_CTRL_SELECT_PEN(2)
	db "ELIOT ", CHARS_CTRL_SELECT_PEN(2)
	db"  KRUSTY",CHARS_CTRL_SELECT_PEN(3),  0xF9, CHARS_CTRL_SELECT_PEN(2)
	

	db CHARS_CTRL_LOCATE((40-9)/2, 14), CHARS_CTRL_SELECT_PEN(3),  0xFa, CHARS_CTRL_SELECT_PEN(2)
	db "WARLORD", CHARS_CTRL_SELECT_PEN(3),  0xFb,

	db CHARS_CTRL_LOCATE((40-17-6)/2, 15),  CHARS_CTRL_SELECT_PEN(3),  0xF9, CHARS_CTRL_SELECT_PEN(2)
	db"RETRO VYNZ ",CHARS_CTRL_SELECT_PEN(3), CHARS_CTRL_SELECT_PEN(2)
	db" VOXFREAX",CHARS_CTRL_SELECT_PEN(3), 0xf8, CHARS_CTRL_SELECT_PEN(2)

	db CHARS_CTRL_LOCATE((40-string_len("CRTC 0"))/2, 19); position of CRTC message
    db 0

crtc_detection
	DS_PRODUCE_CRTC_DETECTOR_ROUTINE()
 



	if REDEFINE_FONT
redefined_font
.start
	;incbin "data/FONTE.BIN"

	incbin "generated/BASIC_FONT_000.BIN"
	incbin "generated/BASIC_FONT_001.BIN"
	incbin "generated/BASIC_FONT_002.BIN"
	incbin "generated/BASIC_FONT_003.BIN"
	incbin "generated/BASIC_FONT_004.BIN"
	incbin "generated/BASIC_FONT_005.BIN"
	incbin "generated/BASIC_FONT_006.BIN"
	incbin "generated/BASIC_FONT_007.BIN"
	incbin "generated/BASIC_FONT_008.BIN"
	incbin "generated/BASIC_FONT_009.BIN"
	incbin "generated/BASIC_FONT_010.BIN"
	incbin "generated/BASIC_FONT_011.BIN"
	incbin "generated/BASIC_FONT_012.BIN"
	incbin "generated/BASIC_FONT_013.BIN"
	incbin "generated/BASIC_FONT_014.BIN"
	incbin "generated/BASIC_FONT_015.BIN"
	incbin "generated/BASIC_FONT_016.BIN"
	incbin "generated/BASIC_FONT_017.BIN"
	incbin "generated/BASIC_FONT_018.BIN"
	incbin "generated/BASIC_FONT_019.BIN"
	incbin "generated/BASIC_FONT_020.BIN"
	incbin "generated/BASIC_FONT_021.BIN"
	incbin "generated/BASIC_FONT_022.BIN"
	incbin "generated/BASIC_FONT_023.BIN"
	incbin "generated/BASIC_FONT_024.BIN"
	incbin "generated/BASIC_FONT_025.BIN"
	incbin "generated/BASIC_FONT_026.BIN"
	incbin "generated/BASIC_FONT_027.BIN"
	incbin "generated/BASIC_FONT_028.BIN"
	incbin "generated/BASIC_FONT_029.BIN"
	incbin "generated/BASIC_FONT_030.BIN"
	incbin "generated/BASIC_FONT_031.BIN"
	incbin "generated/BASIC_FONT_032.BIN"
	incbin "generated/BASIC_FONT_033.BIN"
	incbin "generated/BASIC_FONT_034.BIN"
	incbin "generated/BASIC_FONT_035.BIN"
	incbin "generated/BASIC_FONT_036.BIN"
	incbin "generated/BASIC_FONT_037.BIN"
	incbin "generated/BASIC_FONT_038.BIN"
	incbin "generated/BASIC_FONT_039.BIN"
	incbin "generated/BASIC_FONT_040.BIN"
	incbin "generated/BASIC_FONT_041.BIN"
	incbin "generated/BASIC_FONT_042.BIN"
	incbin "generated/BASIC_FONT_043.BIN"
	incbin "generated/BASIC_FONT_044.BIN"
	incbin "generated/BASIC_FONT_045.BIN"
	incbin "generated/BASIC_FONT_046.BIN"
	incbin "generated/BASIC_FONT_047.BIN"
	incbin "generated/BASIC_FONT_048.BIN"
	incbin "generated/BASIC_FONT_049.BIN"
	incbin "generated/BASIC_FONT_050.BIN"
	incbin "generated/BASIC_FONT_051.BIN"
	incbin "generated/BASIC_FONT_052.BIN"
	incbin "generated/BASIC_FONT_053.BIN"
	incbin "generated/BASIC_FONT_054.BIN"
	incbin "generated/BASIC_FONT_055.BIN"
	incbin "generated/BASIC_FONT_056.BIN"
	incbin "generated/BASIC_FONT_057.BIN"
	incbin "generated/BASIC_FONT_058.BIN"
	incbin "generated/BASIC_FONT_059.BIN"
	incbin "generated/BASIC_FONT_060.BIN"
	incbin "generated/BASIC_FONT_061.BIN"
	incbin "generated/BASIC_FONT_062.BIN"
	incbin "generated/BASIC_FONT_063.BIN"
	incbin "generated/BASIC_FONT_064.BIN"
	incbin "generated/BASIC_FONT_065.BIN"
	incbin "generated/BASIC_FONT_066.BIN"
	incbin "generated/BASIC_FONT_067.BIN"
	incbin "generated/BASIC_FONT_068.BIN"
	incbin "generated/BASIC_FONT_069.BIN"
	incbin "generated/BASIC_FONT_070.BIN"
	incbin "generated/BASIC_FONT_071.BIN"
	incbin "generated/BASIC_FONT_072.BIN"
	incbin "generated/BASIC_FONT_073.BIN"
	incbin "generated/BASIC_FONT_074.BIN"
	incbin "generated/BASIC_FONT_075.BIN"
	incbin "generated/BASIC_FONT_076.BIN"
	incbin "generated/BASIC_FONT_077.BIN"
	incbin "generated/BASIC_FONT_078.BIN"
	incbin "generated/BASIC_FONT_079.BIN"
	incbin "generated/BASIC_FONT_080.BIN"
	incbin "generated/BASIC_FONT_081.BIN"
	incbin "generated/BASIC_FONT_082.BIN"
	incbin "generated/BASIC_FONT_083.BIN"
	incbin "generated/BASIC_FONT_084.BIN"
	incbin "generated/BASIC_FONT_085.BIN"
	incbin "generated/BASIC_FONT_086.BIN"
	incbin "generated/BASIC_FONT_087.BIN"
	incbin "generated/BASIC_FONT_088.BIN"
	incbin "generated/BASIC_FONT_089.BIN"
	incbin "generated/BASIC_FONT_090.BIN"
	incbin "generated/BASIC_FONT_091.BIN"
	incbin "generated/BASIC_FONT_092.BIN"
	incbin "generated/BASIC_FONT_093.BIN"
	incbin "generated/BASIC_FONT_094.BIN"
	incbin "generated/BASIC_FONT_095.BIN"
	incbin "generated/BASIC_FONT_096.BIN"
	

.length = $-.start
	endif



	include "greetings.asm"




intro
	if SKIP_INTRODUCTION
		rorg 0x100
			
			if SKIP_POLAR_DOTS
				include "src/load_make_it_easy_loader.asm"
			else
				include "src/load_outer_space_loader.asm"
			endif
		rend
	else
		incbin "../IntroHBL/INTRO.LNK"
	endif
intro_size equ $-intro
intro_loader
	ld hl, intro

	if SKIP_INTRODUCTION
		ld de, 0x100
	else
		ld de, 0x200
	endif
	push de
	ld bc, intro_size
	ldir
	ret


	if $ >0x4000
		FONT_LOCATION equ $ 
	else
	    FONT_LOCATION equ &4000
	endif

Full Source

Show Source
;;
; Split he file in two parts as it cannot be loaded as a full

OUTER_SPACE_LOAD = 0x180
	OUTER_SPACE_EXEC = OUTER_SPACE_LOAD

	org OUTER_SPACE_LOAD
	run OUTER_SPACE_LOAD

start
	incbin "../polar_dots/POLAR.BIN"
stop

	save "HBL.000", OUTER_SPACE_LOAD, 0xa000-OUTER_SPACE_LOAD, AMSDOS
	save "HBL.001", 0xa000, (stop-start) - (0xa000-OUTER_SPACE_LOAD), AMSDOS

Full Source

Show Source
	org 0x0200
	run 0x0200
	incbin "../MakeItEasy/CRTC0.PT1"

Full Source

Show Source
	org 0x0200
	run 0x0200
	incbin "../polar_dots/POLAR.LOA"

Full Source

Show Source
	org 0x0200
	run 0x0200
	incbin "../MakeItEasy/MAKEIT.LOA"

Full Source

Show Source
	org 0x0200
	run 0x0200
	incbin "../IntroHBL/INTRO.LNK"

Full Source

Show Source
	org 0x0200
	run 0x0200
	incbin "../IntroHBL/INTRO.LOA"

Full Source

Show Source
	incbin "../MakeItEasy/CRTC0.PT2"

Full Source

Show Source
	incbin "../MakeItEasy/CRTC1.PT2"

Full Source

Show Source
	incbin "../MakeItEasy/CRTC2.PT2"

Full Source

Show Source
	incbin "../MakeItEasy/CRTC3.PT2"

Full Source

Show Source
	incbin "../MakeItEasy/CRTC4.PT2"

Full Source

Show Source

SCREEN_MAXIMUM_DURATION equ 5*50*60 ; The maximum play of a part. Should be able to play the longest tune 2 times


	;;
	; Modify H and A
	; Z is set if need to leave
	macro CHECK_IF_PART_IS_OVER
		; handle the counting
		ld hl, SCREEN_MAXIMUM_DURATION
@counter equ $-2
		dec hl
		ld (@counter), hl

		; handle the leaving
		ld a, h
		or l
	endm

Full Source

Show Source
	DS_LOAD_FILE_IN_MAIN_PAGE(intro_fname, intro_fname_size, intro_load, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON | DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF) 
    jp intro_exec

intro_fname db "HBL     .005"
intro_fname_size = $-intro_fname
intro_load equ 0x200
intro_exec equ intro_load

	assert $< intro_load

Full Source

Show Source
	MAKEIT_EASY_LOAD equ 0x260
    MAKEIT_EASY_EXEC equ MAKEIT_EASY_LOAD


	; Get the file size to properly compute their loading addresses

	FIRST_FILE_LEN equ list_len(load("HBL.002"))
	SECOND_FILE_CRTC0_LEN equ list_len(load("HBL.007"))
	SECOND_FILE_CRTC1_LEN equ list_len(load("HBL.008"))
	SECOND_FILE_CRTC2_LEN equ list_len(load("HBL.009"))
	SECOND_FILE_CRTC3_LEN equ list_len(load("HBL.010"))
	SECOND_FILE_CRTC4_LEN equ list_len(load("HBL.011"))

	   print "FIRST_FILE_LEN=", FIRST_FILE_LEN
       print "SECOND_FILE_CRTC0_LEN=", SECOND_FILE_CRTC0_LEN
       print "SECOND_FILE_CRTC1_LEN=", SECOND_FILE_CRTC1_LEN
       print "SECOND_FILE_CRTC2_LEN=", SECOND_FILE_CRTC2_LEN
       print "SECOND_FILE_CRTC3_LEN=", SECOND_FILE_CRTC3_LEN
       print "SECOND_FILE_CRTC4_LEN=", SECOND_FILE_CRTC4_LEN
	; to ease loader and everything we will use the same code for all CRTC data

	; as such we need to know the max length to always copy the same amount of data

	SECOND_FILE_MAX_LEN equ max(SECOND_FILE_CRTC0_LEN,SECOND_FILE_CRTC1_LEN,SECOND_FILE_CRTC2_LEN,SECOND_FILE_CRTC3_LEN,	SECOND_FILE_CRTC4_LEN)

	print "Make It Easy loader: First file length: ", FIRST_FILE_LEN
	print "Make It Easy loader: Second file lengths: ", SECOND_FILE_MAX_LEN


	assert $< MAKEIT_EASY_LOAD

	; Load first half in main memory

    DS_LOAD_FILE_IN_MAIN_PAGE(hbl002_fname, hbl002_fname_size, MAKEIT_EASY_LOAD, DS_LOADER_OPTION_NONE)

	print "LOAD FIRST FILE IN ", {hex}MAKEIT_EASY_LOAD


	; select the right file to load in 2nd

	; get the selected CRTC file address

	ld a, i : add a
	ld h, 0 : ld l, a
	ld de, makeit_easy_crtc_table
	add hl, de
	ld e, (hl) : inc hl : ld d, (hl)

	; and copy it in the buffer

	ex de, hl
	ld de, hbl_selected_fname
	ld bc, hbl007_fname_size
	ldir

    ; Load second half in extra memory

    DS_LOAD_FILE_IN_EXTRA_PAGE(hbl_selected_fname, hbl007_fname_size, 0x4000, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF) ; => load in bank C5




    ; Copy second half in main memory

	di
    	ld hl, 0xc9fb : ld (0x38), hl ; kill the system

		ld sp, $
	ei

    ld bc, 0x7fc5 : out (c), c
		assert SECOND_FILE_MAX_LEN <= 0x4000, "Need to copy the rest from another bank"
		assert MAKEIT_EASY_LOAD + FIRST_FILE_LEN < 0x8000, "we need to rewrite data copy"
  
		; data is in 0x4000-0x7fff in bank but needs to also be copied in this area in main memory



		NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY equ MAKEIT_EASY_LOAD + FIRST_FILE_LEN
		assert NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY > 0x4000
		assert NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY < 0x8000, "we need to rewrite data copy to remove the handling of the small part"

		FIRST_PART_COPYING_LEN equ 0x8000 - NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY : assert FIRST_PART_COPYING_LEN < 0x4000; the remaining part in the bank

		SECOND_FILE_FIRST_PART_DESTINATION equ NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY
	
		if FIRST_PART_COPYING_LEN < SECOND_FILE_MAX_LEN
			NEEDS_SECOND_PART_COPYING equ true
		else
			NEEDS_SECOND_PART_COPYING equ false
		endif
		
		if NEEDS_SECOND_PART_COPYING
			assert false, "It never happens yet. So uncomment and expect bugs"
			SECOND_PART_COPYING_LEN equ SECOND_FILE_MAX_LEN - FIRST_PART_COPYING_LEN : assert SECOND_PART_COPYING_LEN >= 0
			SECOND_FILE_SECOND_PART_DESTINATION = SECOND_FILE_FIRST_PART_DESTINATION + FIRST_PART_COPYING_LEN

			print "FIRST_PART_COPYING_LEN = ", FIRST_PART_COPYING_LEN
			print "SECOND_PART_COPYING_LEN = ", SECOND_PART_COPYING_LEN
		endif
		


		call palette_fadeout

		ld bc, 0xbc00 + 1 : out (c), c
		ld bc, 0xbd00 + 0 : out (c), c

		; transfer first bytes that connot be copied directly

		ld hl, 0x4000
		ld de, 0xc000 ; of course screen need to be cleared before

		assert 0xC000 > SECOND_FILE_FIRST_PART_DESTINATION + SECOND_FILE_MAX_LEN, "memory overlap, cannot proceed"
		ld bc, FIRST_PART_COPYING_LEN  : assert FIRST_PART_COPYING_LEN > 0
		ldir

		if NEEDS_SECOND_PART_COPYING
			; transfer rest directly to destination

			; hl is already at the right place

			ld de, SECOND_FILE_FIRST_PART_DESTINATION
			ld bc, SECOND_PART_COPYING_LEN   : assert SECOND_PART_COPYING_LEN > 0
			ldir
		endif

		; put them at the right place

		ld bc, 0x7fc0 : out (c), c
		ld hl, 0xC000
		ld de, SECOND_FILE_FIRST_PART_DESTINATION
		ld bc, FIRST_PART_COPYING_LEN
		ldir

	jp MAKEIT_EASY_EXEC
	
	;DS_LOAD_AND_RUN_FILE_IN_MAIN_PAGE(makeit_easy_fname, makeit_easy_fname_size, makeit_easy_load, makeit_easy_exec, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF) 




makeit_easy_crtc_table
	dw hbl007_fname
	dw hbl008_fname
	dw hbl009_fname
	dw hbl010_fname
	dw hbl011_fname


hbl002_fname db "HBL    .002"
hbl002_fname_size equ $-hbl002_fname

hbl007_fname db "HBL    .007"
hbl007_fname_size equ $-hbl007_fname
hbl008_fname db "HBL    .008"
hbl008_fname_size equ $-hbl008_fname
hbl009_fname db "HBL    .009"
hbl009_fname_size equ $-hbl009_fname
hbl010_fname db "HBL    .010"
hbl010_fname_size equ $-hbl010_fname
hbl011_fname db "HBL    .011"
hbl011_fname_size equ $-hbl011_fname


hbl_selected_fname defs hbl007_fname_size


; We need to do a palette jsut after loading because 0xc000 is used as a buffer

palette_fadeout

.loop
	DS_SECURE_WAIT_VSYNC()

	; select the right palette

	ld hl, .data
.palette_adress equ $-2
	ld b, 0x7f : xor a
.ga_loop
	ld c, (hl)
	out (c), a
	out (c), c

	inc hl
	inc a
	cp 16 : jr nz, .ga_loop

	; change the palette every x frames

	ld a, 4
.wait equ $-1
	inc a : and %11
	ld (.wait), a
	jr nz, .loop

	ld hl, (.palette_adress)
	ld de, 16
	add hl, de
	ld (.palette_adress), hl

	ld a, (hl) : or a
	ret z

	jr .loop


.data
	incbin "loading_fadeout.ga", 1*16, 16
	incbin "loading_fadeout.ga", 2*16, 16
	incbin "loading_fadeout.ga", 3*16, 16
	incbin "loading_fadeout.ga", 4*16, 16
	db 0


	assert $< MAKEIT_EASY_LOAD, "you are overlapping loader code!"

Full Source

Show Source


	DS_LOAD_FILE_IN_MAIN_PAGE(makeit_loader_fname, makeit_loader_fname_size, makeit_loader_load, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON) 
	jp makeit_loader_exec

makeit_loader_fname db "HBL     .004"
makeit_loader_fname_size = $-makeit_loader_fname
makeit_loader_load equ 0x180
makeit_loader_exec equ 0x180



	assert $< makeit_loader_load

Full Source

Show Source
    OUTER_SPACE_LOAD = 0x180
    OUTER_SPACE_EXEC = OUTER_SPACE_LOAD

	; Get the file size to properly compute their loading addresses
	FIRST_FILE_LEN = list_len(load("HBL.000"))
	SECOND_FILE_LEN = list_len(load("HBL.001"))

	assert $< OUTER_SPACE_LOAD


	;db 0xed, 0xff ; winape breakpoint

	; Load first half in main memory
    DS_LOAD_FILE_IN_MAIN_PAGE(hbl000_fname, hbl000_fname_size, OUTER_SPACE_LOAD, DS_LOADER_OPTION_NONE)

    ; Load second half in extra memory
    DS_LOAD_FILE_IN_EXTRA_PAGE(hbl001_fname, hbl001_fname_size, 0x4000, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF) ; => load in bank C5

	di
		ld hl, 0xc9fb : ld (0x38), hl
    	ld sp, $
	ei

	call palette_fadeout

	ld bc, 0xbc00 + 1 : out (c), c
	ld bc, 0xbd00 + 80/2 : out (c), c
	ld bc, 0xbc00 + 6 : out (c), c
	ld bc, 0xbd00 + 25 : out (c), c

    ; Copy second half in main memory
    ld hl, 0xc9fb : ld (0x38), hl ; kill the system
    ld bc, 0x7fc5 : out (c), c
		assert SECOND_FILE_LEN <= 0x4000, "Need to copy the rest from another bank"
		assert OUTER_SPACE_LOAD + FIRST_FILE_LEN >= 0x8000, "cannot copy here"
        ld hl, 0x4000
        ld de, OUTER_SPACE_LOAD + FIRST_FILE_LEN
        ld bc, SECOND_FILE_LEN
        ldir
    ld bc, 0x7fc0 : out (c), c



	ld bc, 0xbc00 + 12
	ld hl, 0x3000
	out (c),c : inc b : out (c), h : dec b : inc c
	out (c),c : inc b : out (c), l
	
    ; jump into demo stuff
    jp OUTER_SPACE_EXEC

palette_fadeout

.loop
	DS_SECURE_WAIT_VSYNC()

	; select the right palette
	ld hl, .data
.palette_adress equ $-2
	ld b, 0x7f : xor a
.ga_loop
	ld c, (hl)
	out (c), a
	out (c), c

	inc hl
	inc a
	cp 4 : jp nz, .ga_loop

	; change the palette every x frames
	ld a, 4
.wait equ $-1
	inc a : and %11
	ld (.wait), a
	jp nz, .loop

	ld hl, (.palette_adress)
	ld de, 4
	add hl, de
	ld (.palette_adress), hl

	ld a, (hl) : or a
	ret z

	jp .loop
	
.data
	incbin "screen1_fadeout.ga", 1*16, 4
	incbin "screen1_fadeout.ga", 2*16, 4
	incbin "screen1_fadeout.ga", 3*16, 4
	incbin "screen1_fadeout.ga", 4*16, 4
	db 0


	    assert $ < OUTER_SPACE_LOAD

hbl000_fname db "HBL     .000"
hbl000_fname_size equ $-hbl000_fname

hbl001_fname db "HBL     .001"
hbl001_fname_size equ $-hbl001_fname

Full Source

Show Source
	
	
	jp $

	ld bc, 0xbc00 + 3 : out (c)
	ld bc, 0xbd00 + 0x8e : out (c)

	DS_LOAD_FILE_IN_MAIN_PAGE(polar_loader_fname, polar_loader_fname_size, polar_loader_load, DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON) 
	jp polar_loader_exec

polar_loader_fname db "HBL     .003"
polar_loader_fname_size = $-polar_loader_fname
polar_loader_load equ 0x180
polar_loader_exec equ 0x180



	assert $< polar_loader_load

Full Source

Show Source
;       Arkos Tracker AKM (Minimalist) player (format V0).
;       By Targhan/Arkos.
;
;       Thanks to Hicks/Vanity for two small (but relevant!) optimizations.

;       v1.0b:  - Removed the ":" before EQU, for RASM 2.3.9.
;               - Changed the MSX period table to 1789773 Hz (was 1773400 Hz like Spectrum before).
;               - Cleaned conditionals when the SFX has hardware sounds, but not the main song, using player configuration (thanks Arnaud!).
;       v1.0a: 
;               - To remove hooks, define PLY_AKM_REMOVE_HOOKS (PLY_AKM_REMOVE_HOOKS = 1).
;               - PLY_AKM_REMOVE_STOP_SOUNDS added (instead of the previously used PLY_AKM_STOP_SOUNDS constant) to remove the snippet to stop the sounds.
;
;       This compiles with RASM. Check the compatibility page on the Arkos Tracker 3 website, it contains a source converter to any Z80 assembler!;

;       This is a Minimalist player. Only a subset of the generic player is used. Use this player for 4k demo or other productions
;       with a tight memory limitation. However, this remains a versatile and powerful player, so it may fit any production!
;
;       Though the player is optimized in speed, it is much slower than the generic one or the AKY player.
;       With effects used at the same time, it can reach 45 scanlines on a CPC, plus some few more if you are using sound effects.
;       So it's slightly faster than the Soundtrakker 128 player, but smaller and more powerful (so what are you complaining about?).
;
;       The player uses the stack for optimizations. Make sure the interruptions are disabled before it is called.
;       The stack pointer is saved at the beginning and restored at the end.
;
;       Target hardware:
;       ---------------
;       This code can target Amstrad CPC, MSX, Spectrum and Pentagon. By default, it targets Amstrad CPC.
;       Simply use one of the follow line (BEFORE this player):
;       PLY_AKM_HARDWARE_CPC = 1
;       PLY_AKM_HARDWARE_MSX = 1
;       PLY_AKM_HARDWARE_SPECTRUM = 1
;       PLY_AKM_HARDWARE_PENTAGON = 1
;       Note that the PRESENCE of this variable is tested, NOT its value.

;       Optimizations
;       -------------
;       - Use the Player Configuration of Arkos Tracker to generate a configuration file to be included at the beginning of this player.
;         It will disable useless features according to your songs! Check the manual for more details, or more simply the testers.
;       - SIZE: Hooks for external calls (play/init) are present by default. Define PLY_AKM_REMOVE_HOOKS to remove them (PLY_AKM_REMOVE_HOOKS = 1).
;       - SIZE: Define PLY_AKM_REMOVE_STOP_SOUNDS to remove the Stop sound method (PLY_AKM_Stop) if you don't intend on stopping the music.

;       Sound effects:
;       --------------
;       Sound effects are disabled by default. Declare PLY_AKM_MANAGE_SOUND_EFFECTS to enable it:
;       PLY_AKM_MANAGE_SOUND_EFFECTS = 1
;       Check the sound effect tester to see how it enables it.
;       Note that the PRESENCE of this variable is tested, NOT its value.
;
;       ROM
;       ----------------------
;       To use a ROM player (no automodification, use of a small buffer to put in RAM):
;       PLY_AKM_Rom = 1
;       PLY_AKM_ROM_Buffer = #4000 (or wherever).
;       This makes the player a bit slower and slightly bigger.
;       The buffer is PLY_AKM_ROM_BufferSize bytes long (199 bytes max, 273 if using sound effects).
;
;       -------------------------------------------------------
PLY_AKM_Start:

        ;Checks that RASM mnemonic REPEAT instruction has the default values. If your code previously modified them (via the startingindex mnemonic),
        ;please set the default values BEFORE including this player, and set yours again AFTER including this player!
        IFDEF RASM_VERSION      ;To prevent BASM from interpreting this snippet.
                PLY_AKM_REPEAT_CHECK = 1
                REPEAT 7, check
                        PLY_AKM_REPEAT_CHECK = PLY_AKM_REPEAT_CHECK * check
                REND
                IF PLY_AKM_REPEAT_CHECK != 5040
                        FAIL 'You have modified startingindex! Please set the default values BEFORE including the player! Then put yours back AFTER.'
                ENDIF
        ENDIF

        ;Checks the hardware. Only one must be selected.
PLY_AKM_HardwareCounter = 0
        IFDEF PLY_AKM_HARDWARE_CPC
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                ;CPC values are set below.
        ENDIF
        IFDEF PLY_AKM_HARDWARE_MSX
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_PSG_1789773_HZ = 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_MSX = 1
        ENDIF
        IFDEF PLY_AKM_HARDWARE_SPECTRUM
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_PSG_1773400_HZ = 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON = 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_MSX = 1
        ENDIF
        IFDEF PLY_AKM_HARDWARE_PENTAGON
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_PSG_1750000_HZ = 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON = 1
        ENDIF
        IF PLY_AKM_HardwareCounter > 1
                FAIL 'Only one hardware must be selected!'
        ENDIF

        ;By default, selects the Amstrad CPC.
        IF PLY_AKM_HardwareCounter == 0
                PLY_AKM_HARDWARE_CPC = 1
        ENDIF

        IFDEF PLY_AKM_HARDWARE_CPC
                PLY_AKM_HARDWARE_PSG_1000000_HZ = 1
        ENDIF


        ;Disark macro: Word region Start.
        disarkCounter = 0
        IFNDEF dkws
        MACRO dkws
PLY_AKM_DisarkWordRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Word region End.
        IFNDEF dkwe
        MACRO dkwe
PLY_AKM_DisarkWordRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        
        ;Disark macro: Pointer region Start.
        disarkCounter = 0
        IFNDEF dkps
        MACRO dkps
PLY_AKM_DisarkPointerRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Pointer region End.
        IFNDEF dkpe
        MACRO dkpe
PLY_AKM_DisarkPointerRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        
        ;Disark macro: Byte region Start.
        disarkCounter = 0
        IFNDEF dkbs
        MACRO dkbs
PLY_AKM_DisarkByteRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Byte region End.
        IFNDEF dkbe
        MACRO dkbe
PLY_AKM_DisarkByteRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF

        ;Disark macro: Force "No Reference Area" for 3 bytes (ld hl,xxxx).
        IFNDEF dknr3
        MACRO dknr3
PLY_AKM_DisarkForceNonReferenceDuring3_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        

        ;Hooks for external calls. Can be removed if not needed.
        IFNDEF PLY_AKM_REMOVE_HOOKS
		assert PLY_AKM_Start == $		;Makes sure no extra byte were inserted before the hooks.
                jp PLY_AKM_Init          ;Player + 0.
                jp PLY_AKM_Play          ;Player + 3.
                IFNDEF PLY_AKM_REMOVE_STOP_SOUNDS
                        jp PLY_AKM_Stop          ;Player + 6.
                ENDIF
        ENDIF
        
        ;Includes the sound effects player, if wanted. Important to do it as soon as possible, so that
        ;its code can react to the Player Configuration and possibly alter it.
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
		include "PlayerAkm_SoundEffects.asm"
        ENDIF
        ;[[INSERT_SOUND_EFFECT_SOURCE]]                 ;A tag for test units. Don't touch or you're dead.

        ;Is there a loaded Player Configuration source? If no, use a default configuration.
        IFNDEF PLY_CFG_ConfigurationIsPresent
                PLY_CFG_UseTranspositions = 1
                PLY_CFG_UseSpeedTracks = 1
                PLY_CFG_UseEffects = 1
                PLY_CFG_UseHardwareSounds = 1
                PLY_CFG_NoSoftNoHard_Noise = 1
                PLY_CFG_SoftOnly_Noise = 1
                PLY_CFG_SoftOnly_SoftwarePitch = 1
                PLY_CFG_SoftToHard_SoftwarePitch = 1
                PLY_CFG_SoftToHard_SoftwareArpeggio = 1
                PLY_CFG_SoftAndHard_SoftwarePitch = 1
                PLY_CFG_SoftAndHard_SoftwareArpeggio = 1
                PLY_CFG_UseEffect_ArpeggioTable = 1
                PLY_CFG_UseEffect_ForcePitchTableSpeed = 1
                PLY_CFG_UseEffect_ForceArpeggioSpeed = 1
                PLY_CFG_UseEffect_ForceInstrumentSpeed = 1
                PLY_CFG_UseEffect_PitchUp = 1
                PLY_CFG_UseEffect_PitchDown = 1
                PLY_CFG_UseEffect_PitchTable = 1
                PLY_CFG_UseEffect_SetVolume = 1
                PLY_CFG_UseEffect_Reset = 1
        ENDIF
        
        ;Agglomerates some flags, because they are treated the same way by this player.
        ;--------------------------------------------------
        ;Creates a flag for pitch in instrument, and also pitch in hardware.
        IFDEF PLY_CFG_SoftOnly_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftToHard_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
                PLY_AKM_PitchInHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftAndHard_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
                PLY_AKM_PitchInHardwareInstrument = 1
        ENDIF
        ;A flag for Arpeggios in Instrument, both in software and hardware.
        IFDEF PLY_CFG_SoftOnly_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftToHard_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
                PLY_AKM_ArpeggioInHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftAndHard_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
                PLY_AKM_ArpeggioInHardwareInstrument = 1
        ENDIF      
        
        ;A flag if noise is used (noise in hardware not tested, not present in this format).
        IFDEF PLY_CFG_NoSoftNoHard_Noise
                PLY_AKM_USE_Noise = 1
        ENDIF
        IFDEF PLY_CFG_SoftOnly_Noise
                PLY_AKM_USE_Noise = 1
        ENDIF
        ;The noise is managed? Then the noise register access must be compiled.
        IFDEF PLY_AKM_USE_Noise
                PLY_AKM_USE_NoiseRegister = 1
        ENDIF
        
        ;Mixing Pitch up/down effects.
        IFDEF PLY_CFG_UseEffect_PitchUp
                PLY_AKM_USE_EffectPitchUpDown = 1
        ENDIF
        IFDEF PLY_CFG_UseEffect_PitchDown
                PLY_AKM_USE_EffectPitchUpDown = 1
        ENDIF
        
        ;If the Force Arpeggio Speed if used, it means the ArpeggioTable effect must also be!
        IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed
                PLY_CFG_UseEffect_ArpeggioTable = 1
        ENDIF
        ;If the Force Pitch Table Speed if used, it means the PitchTable effect must also be!
        IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed
                PLY_CFG_UseEffect_PitchTable = 1
        ENDIF

;A nice trick to manage the offset using the same instructions, according to the player (ROM or not).
        IFDEF PLY_AKM_Rom
PLY_AKM_Offset1b equ 0
PLY_AKM_Offset2b equ 0         ;Used for instructions such as ld iyh,xx
        ELSE
PLY_AKM_Offset1b equ 1
PLY_AKM_Offset2b equ 2
        ENDIF

;Initializes the song. MUST be called before actually playing the song.
;IN:    HL = Address of the song.
;       A = Index of the subsong to play (>=0).
PLY_AKM_InitDisarkGenerateExternalLabel:
PLY_AKM_Init:
        ;Reads the Song header.
        ;Reads the pointers to the various index tables.
        ld de,PLY_AKM_PtInstruments + PLY_AKM_Offset1b
        ldi
        ldi
                        IFDEF PLY_CFG_UseEffects                           ;CONFIG SPECIFIC
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable      ;CONFIG SPECIFIC
        ld de,PLY_AKM_PtArpeggios + PLY_AKM_Offset1b
        ldi
        ldi
                                ELSE
                                inc hl
                                inc hl
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                                IFDEF PLY_CFG_UseEffect_PitchTable         ;CONFIG SPECIFIC
        ld de,PLY_AKM_PtPitches + PLY_AKM_Offset1b
        ldi
        ldi
                                ELSE
                                inc hl
                                inc hl
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
                        ELSE
dknr3 (void):  ld de,4
        add hl,de
                        ENDIF ;PLY_CFG_UseEffects
                        
        ;Finds the address of the Subsong.
        ;HL points on the table, adds A * 2.
        ;Possible optimization: possible to set the Subsong directly.
        add a,a
        ld e,a
        ld d,0
        add hl,de
        ld a,(hl)
        inc hl
        ld h,(hl)
        ld l,a

        ;Reads the header of the Subsong, copies the values inside the code via a table.
        ld ix,PLY_AKM_InitVars_Start
        ld a,(PLY_AKM_InitVars_End - PLY_AKM_InitVars_Start) / 2
PLY_AKM_InitVars_Loop:
        ld e,(ix + 0)
        ld d,(ix + 1)
        inc ix
        inc ix
        ldi
        dec a
        jr nz,PLY_AKM_InitVars_Loop

        ;A is zero, no need to reset it.        
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a       ;Optimization: this line can be removed if there is no need to reset the song (warning, A is used below).

        ;Stores the Linker address, just after.
        ex de,hl
        ld hl,PLY_AKM_PtLinker + PLY_AKM_Offset1b
        ld (hl),e
        inc hl
        ld (hl),d

        ;A big LDIR to erase all the data blocks. Optimization: can be removed if there is no need to reset the song.
        ;A is considered 0!
        ld hl,PLY_AKM_Track1_Data
        ld de,PLY_AKM_Track1_Data + 1
dknr3 (void):  ld bc,PLY_AKM_Track3_Data_End - PLY_AKM_Track1_Data - 1
        ld (hl),a
        ldir
        
        ;Resets this flag. Especially important for ROM.
        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
                ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        ENDIF

        ;Forces a new line.
        ld a,(PLY_AKM_Speed + PLY_AKM_Offset1b)
        dec a
        ld (PLY_AKM_TickCounter + PLY_AKM_Offset1b),a

        ;Reads the first instrument, the empty one, and set-ups the pointers to the instrument to read.
        ;Optimization: needed if the song doesn't start with an instrument on all the channels. Else, it can be removed.
        ld hl,(PLY_AKM_PtInstruments + PLY_AKM_Offset1b)
        ld e,(hl)
        inc hl
        ld d,(hl)
        inc de          ;Skips the header.
        ld (PLY_AKM_Track1_PtInstrument),de
        ld (PLY_AKM_Track2_PtInstrument),de
        ld (PLY_AKM_Track3_PtInstrument),de
        
        ;If sound effects, clears the SFX state.
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
dknr3 (void):          ld hl,0
                ld (PLY_AKM_Channel1_SoundEffectData),hl
                ld (PLY_AKM_Channel2_SoundEffectData),hl
                ld (PLY_AKM_Channel3_SoundEffectData),hl
        ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS
        
        ;For ROM, generates the RET table.
        IFDEF PLY_AKM_Rom
                ld ix,PLY_AKM_RegistersForRom           ;Source.
                ld iy,PLY_AKM_Registers_RetTable        ;Destination.
                ld bc,PLY_AKM_SendPsgRegister
dknr3 (void):          ld de,4
PLY_AKM_InitRom_Loop:
                ld a,(ix)                 ;Gets the register.
                ld h,a
                inc ix
                and %00111111
                ld (iy + 0),a             ;Writes the register.
                ld (iy + 1),0             ;Value is 0 for now.
                ld a,h
                and %11000000
                jr nz,PLY_AKM_InitRom_Special
                ;Encodes the "normal" SendPsgRegister code address.
                ld (iy + 2),c
                ld (iy + 3),b
                add iy,de
                jr PLY_AKM_InitRom_Loop
PLY_AKM_InitRom_Special:
                IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                rl h
                jr c,PLY_AKM_InitRom_WriteEndCode
                ;Bit 6 must be set if we came here.
                ld bc,PLY_AKM_SendPsgRegisterR13
                ld (iy + 2),c
                ld (iy + 3),b
                ld bc,PLY_AKM_SendPsgRegisterAfterPop ;This one is a trick to send the register after R13 is managed.
                ld (iy + 4),c
                ld (iy + 5),b
                add iy,de               ;Only advance of 4, the code belows expects that.
                ENDIF ;PLY_CFG_UseHardwareSounds
                
PLY_AKM_InitRom_WriteEndCode:
                ld bc,PLY_AKM_SendPsgRegisterEnd
                ld (iy + 2),c
                ld (iy + 3),b
        ENDIF
        ret
        
        ;If ROM, the registers to send, IN THE ORDER they are declared in the ROM buffer!
        ;Bit 7 if ends (end DW to encode). Exclusive to bit 6.
        ;Bit 6 if R13/AfterPop the end DW to encode. Exclusive to bit 7.
        IFDEF PLY_AKM_Rom
PLY_AKM_RegistersForRom:
dkbs (void):
                db 8, 0, 1, 9, 2, 3, 10, 4, 5
                IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
                        db 6
                ENDIF
                IFNDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                        db 7 + 128
                ELSE
                        db 7, 11, 12 + 64     ;13 is NOT declared, special case.
                ENDIF
dkbe (void):
        ENDIF

;Addresses where to put the header data.
PLY_AKM_InitVars_Start:
dkps (void):
        dw PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b
        dw PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b + 1
        dw PLY_AKM_TrackIndex + PLY_AKM_Offset1b
        dw PLY_AKM_TrackIndex + PLY_AKM_Offset1b + 1
        dw PLY_AKM_Speed + PLY_AKM_Offset1b
        dw PLY_AKM_PrimaryInstrument + PLY_AKM_Offset1b
        dw PLY_AKM_SecondaryInstrument + PLY_AKM_Offset1b
        dw PLY_AKM_PrimaryWait + PLY_AKM_Offset1b
        dw PLY_AKM_SecondaryWait + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartNoteInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartInstrumentInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartWaitInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_FlagNoteAndEffectInCell + PLY_AKM_Offset1b
dkpe (void):
PLY_AKM_InitVars_End:


;Cuts the channels, stopping all sounds.
        IFNDEF PLY_AKM_REMOVE_STOP_SOUNDS
PLY_AKM_StopDisarkGenerateExternalLabel:
PLY_AKM_Stop:
        ld (PLY_AKM_SaveSP + PLY_AKM_Offset1b),sp

        xor a
        ld (PLY_AKM_Track1_Volume),a
        ld (PLY_AKM_Track2_Volume),a
        ld (PLY_AKM_Track3_Volume),a
        IFDEF PLY_AKM_HARDWARE_MSX
                ld a,%10111111          ;On MSX, bit 7 must be 1, bit 6 0.
        ELSE
                ld a,%00111111          ;On CPC, bit 6 must be 0. Other platforms don't care.
        ENDIF
        ld (PLY_AKM_MixerRegister),a
        jp PLY_AKM_SendPsg
        endif ;PLY_AKM_REMOVE_STOP_SOUNDS



;Plays one frame of the song. It MUST have been initialized before.
;The stack is saved and restored, but is diverted, so watch out for the interruptions.
PLY_AKM_PlayDisarkGenerateExternalLabel:
PLY_AKM_Play:
        ld (PLY_AKM_SaveSP + PLY_AKM_Offset1b),sp

        ;Reads a new line?
        IFNDEF PLY_AKM_Rom
PLY_AKM_TickCounter: ld a,0
        inc a
PLY_AKM_Speed: cp 1                       ;Speed (>0).
        ELSE
        ld a,(PLY_AKM_Speed)
        ld b,a
        ld a,(PLY_AKM_TickCounter)
        inc a
        cp b
        ENDIF
        jp nz,PLY_AKM_TickCounterManaged

        ;A new line must be read. But have we reached the end of the Pattern?
        IFNDEF PLY_AKM_Rom
PLY_AKM_PatternRemainingHeight: ld a,0              ;Height. If 0, end of the pattern.
        ELSE
        ld a,(PLY_AKM_PatternRemainingHeight)
        ENDIF
        sub 1
        jr c,PLY_AKM_Linker
        ;Pattern not ended. No need to read the Linker.
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a
        jr PLY_AKM_ReadLine

        ;New pattern. Reads the Linker.
PLY_AKM_Linker:
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_TrackIndex: ld de,0              ;DE' points on the Track Index. Useful when new Tracks are found.
        ELSE
        ld de,(PLY_AKM_TrackIndex)
        ENDIF
        exx
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtLinker: ld hl,0
        ELSE
        ld hl,(PLY_AKM_PtLinker)
        ENDIF
PLY_AKM_LinkerPostPt:
        ;Resets the possible empty cell counter of each Track.
        xor a
        ld (PLY_AKM_Track1_WaitEmptyCell),a
        ld (PLY_AKM_Track2_WaitEmptyCell),a
        ld (PLY_AKM_Track3_WaitEmptyCell),a
        ;On new pattern, the escape note/instrument/wait values are set for each Tracks.
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartNoteInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartNoteInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeNote),a
        ld (PLY_AKM_Track2_EscapeNote),a
        ld (PLY_AKM_Track3_EscapeNote),a
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartInstrumentInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartInstrumentInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeInstrument),a
        ld (PLY_AKM_Track2_EscapeInstrument),a
        ld (PLY_AKM_Track3_EscapeInstrument),a
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartWaitInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartWaitInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeWait),a
        ld (PLY_AKM_Track2_EscapeWait),a
        ld (PLY_AKM_Track3_EscapeWait),a

        ;Reads the state byte of the pattern.
        ld b,(hl)
        inc hl
        rr b             ;Speed change or end of song?
        jr nc,PLY_AKM_LinkerAfterSpeedChange
        ;Next byte is either the speed (>0) or an end of song marker.
        ld a,(hl)
        inc hl
                        ;If no speed used, it means "end of song" every time.
                        IFDEF PLY_CFG_UseSpeedTracks            ;CONFIG SPECIFIC        
        or a            ;0 if end of song, else speed.
        jr nz,PLY_AKM_LinkerSpeedChange
                        ENDIF ;PLY_CFG_UseSpeedTracks
        ;End of song.
        ld a,(hl)       ;Reads where to loop in the Linker.
        inc hl
        ld h,(hl)
        ld l,a
        jr PLY_AKM_LinkerPostPt
                        IFDEF PLY_CFG_UseSpeedTracks            ;CONFIG SPECIFIC        
PLY_AKM_LinkerSpeedChange:
        ;Speed change.
        ld (PLY_AKM_Speed + PLY_AKM_Offset1b),a
                        ENDIF ;PLY_CFG_UseSpeedTracks
PLY_AKM_LinkerAfterSpeedChange:

        ;New height?
        rr b
        jr nc,PLY_AKM_LinkerUsePreviousHeight
        ld a,(hl)
        inc hl
        ld (PLY_AKM_LinkerPreviousRemainingHeight + PLY_AKM_Offset1b),a
        jr PLY_AKM_LinkerSetRemainingHeight
        ;The same height is used. It was stored before.
PLY_AKM_LinkerUsePreviousHeight:
        IFNDEF PLY_AKM_Rom
PLY_AKM_LinkerPreviousRemainingHeight: ld a,0
        ELSE
        ld a,(PLY_AKM_LinkerPreviousRemainingHeight)
        ENDIF
PLY_AKM_LinkerSetRemainingHeight:
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a

        ;New Transposition and Track for channel 1?
        ld ix,PLY_AKM_Track1_Data
        call PLY_AKM_CheckTranspositionAndTrack
        ;New Transposition and Track for channel 2?
        ld ix,PLY_AKM_Track2_Data
        call PLY_AKM_CheckTranspositionAndTrack
        ;New Transposition and Track for channel 3?
        ld ix,PLY_AKM_Track3_Data
        call PLY_AKM_CheckTranspositionAndTrack
        
        ld (PLY_AKM_PtLinker + PLY_AKM_Offset1b),hl


;Reads the Tracks.
;---------------------------------
PLY_AKM_ReadLine:
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtInstruments: ld de,0
dknr3 (void):
PLY_AKM_NoteIndexTable: ld bc,0
        ELSE
        ld de,(PLY_AKM_PtInstruments)
        ld bc,(PLY_AKM_NoteIndexTable)
        ENDIF
        exx
                ld ix,PLY_AKM_Track1_Data
                call PLY_AKM_ReadTrack
                ld ix,PLY_AKM_Track2_Data
                call PLY_AKM_ReadTrack
                ld ix,PLY_AKM_Track3_Data
                call PLY_AKM_ReadTrack

                xor a
PLY_AKM_TickCounterManaged:
                ld (PLY_AKM_TickCounter + PLY_AKM_Offset1b),a



;Plays the sound stream.
;---------------------------------
                ld de,PLY_AKM_PeriodTable
        exx

        ld c,%11100000          ;Register 7, shifted of 2 to the left. Bits 2 and 5 will be possibly changed by each iteration.

        ld ix,PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track1_Registers
        call PLY_AKM_PlaySoundStream

        srl c                   ;Not RR, because we have to make sure the b6 is 0, else no more keyboard (on CPC)!
                                ;Also, on MSX, bit 6 must be 0.
        ld ix,PLY_AKM_Track2_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track2_Registers
        call PLY_AKM_PlaySoundStream

        IFDEF PLY_AKM_HARDWARE_MSX
                scf             ;On MSX, bit 7 must be 1.
                rr c
        ELSE
                rr c            ;On other platforms, we don't care about b7.
        ENDIF
        ld ix,PLY_AKM_Track3_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track3_Registers
        call PLY_AKM_PlaySoundStream

        ld a,c

;Plays the sound effects, if desired.
;-------------------------------------------
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
                        call PLY_AKM_PlaySoundEffectsStream
        ELSE
                        ld (PLY_AKM_MixerRegister),a
        ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS



;Sends the values to the PSG.
;---------------------------------
PLY_AKM_SendPsg:
        ld sp,PLY_AKM_Registers_RetTable

        IFDEF PLY_AKM_HARDWARE_CPC
dknr3 (void):  ld bc,#f680
        ld a,#c0
dknr3 (void):  ld de,#f4f6
        out (c),a	;#f6c0          ;Madram's trick requires to start with this. out (c),b works, but will activate K7's relay! Not clean.
        ENDIF

        IFDEF PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON
dknr3 (void):  ld de,#bfff
        ld c,#fd
        ENDIF

PLY_AKM_SendPsgRegister:
        pop hl          ;H = value, L = register.
PLY_AKM_SendPsgRegisterAfterPop:
        IFDEF PLY_AKM_HARDWARE_CPC
        ld b,d
        out (c),l       ;#f400 + register.
        ld b,e
        out (c),0       ;#f600
        ld b,d
        out (c),h       ;#f400 + value.
        ld b,e
        out (c),c       ;#f680
        out (c),a       ;#f6c0
        ENDIF

        IFDEF PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON
        ld b,e
        out (c),l       ;#fffd + register.
        ld b,d
        out (c),h       ;#bffd + value
        ENDIF

        IFDEF PLY_AKM_HARDWARE_MSX
        ld a,l          ;Register.
        out (#a0),a
        ld a,h          ;Value.
        out (#a1),a
        ENDIF
        ret

                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
PLY_AKM_SendPsgRegisterR13:

        ;Should the R13 be played? Yes only if different. No "force retrig" is managed by this player.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SetReg13: ld a,0
PLY_AKM_SetReg13Old: cp 0
        ELSE
        ld a,(PLY_AKM_SetReg13Old)
        ld b,a
        ld a,(PLY_AKM_SetReg13)
        cp b
        ENDIF
        jr z,PLY_AKM_SendPsgRegisterEnd
        ;Different. R13 must be played. Updates the old R13 value.
        ld (PLY_AKM_SetReg13Old + PLY_AKM_Offset1b),a

        ld h,a
        ld l,13

        IFDEF PLY_AKM_HARDWARE_CPC
                ld a,#c0
        ENDIF

        ret                     ;Sends the 13th registers.
                        ENDIF ;PLY_CFG_UseHardwareSounds
PLY_AKM_SendPsgRegisterEnd:

        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_SaveSP: ld sp,0
        ELSE
        ld sp,(PLY_AKM_SaveSP)
        ENDIF
        ret





;Shifts B to the right, if carry, a transposition is read.
;Shifts B to the right once again, if carry, a new Track is read (may be an index or a track offset).
;IN:    HL = where to read the data.
;       IX = points on the track data buffer.
;       DE'= Track index table
;       B  = flags.
;OUT:   B  = shifted of two.
;       HL = increased according to read data.
PLY_AKM_CheckTranspositionAndTrack:
        ;New transposition?
        rr b
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        jr nc,PLY_AKM_CheckTranspositionAndTrack_AfterTransposition
        ;Transposition.
        ld a,(hl)
        ld (ix + PLY_AKM_Data_OffsetTransposition),a
        inc hl
PLY_AKM_CheckTranspositionAndTrack_AfterTransposition:
                        ENDIF ;PLY_CFG_UseTranspositions
        ;New Track?
        rr b
        jr nc,PLY_AKM_CheckTranspositionAndTrack_NoNewTrack
        ;New Track.
        ld a,(hl)
        inc hl
        ;Is it a reference?
        sla a
        jr nc,PLY_AKM_CheckTranspositionAndTrack_TrackOffset
        ;Reference.
        exx
                ld l,a          ;A is the track index * 2.
                ld h,0
                add hl,de       ;HL points on the track address.
                ld a,(hl)
                ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 0),a
                ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),a
                inc hl
                ld a,(hl)
                ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 1),a
                ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),a
        exx
        ret
PLY_AKM_CheckTranspositionAndTrack_TrackOffset:
        ;The Track is an offset. Counter the previous shift.
        rra             ;Carry was 0, so bit 7 is 0.
        ld d,a          ;D is the MSB of the offset.
        ld e,(hl)       ;Reads the LSB of the offset.
        inc hl
        
        ld c,l          ;Saves HL.
        ld a,h
        
        add hl,de       ;HL is now the Track (offset + $ (past offset));
        ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 1),h
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        
        ld l,c          ;Retrieves HL.
        ld h,a
        ret
PLY_AKM_CheckTranspositionAndTrack_NoNewTrack:
        ;Copies the old Track inside the new Track pointer, as it evolves.
        ld a,(ix + PLY_AKM_Data_OffsetPtStartTrack + 0)
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),a
        ld a,(ix + PLY_AKM_Data_OffsetPtStartTrack + 1)
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),a
        ret





;Reads a Track.
;IN:    IX = Data block of the Track.
;       DE'= Instrument table. Do not modify!
;       BC'= Note index table. Do not modify!
PLY_AKM_ReadTrack:
        ;Are there any empty lines to wait?
        ld a,(ix + PLY_AKM_Data_OffsetWaitEmptyCell)
        sub 1
        jr c,PLY_AKM_RT_NoEmptyCell
        ;Wait!
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        ret

PLY_AKM_RT_NoEmptyCell:
        ;Reads the Track pointer.
        ld l,(ix + PLY_AKM_Data_OffsetPtTrack + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtTrack + 1)
PLY_AKM_RT_GetDataByte:
        ld b,(hl)
        inc hl
        ;First, reads the note/effect flag.
        IFDEF PLY_AKM_Rom
        ld a,(PLY_AKM_FlagNoteAndEffectInCell)
        ld c,a
        ENDIF
        ld a,b
        and %1111       ;Keeps only the note/data.
        IFNDEF PLY_AKM_Rom
PLY_AKM_FlagNoteAndEffectInCell: cp 12          ;0-12 = note reference if no effects in the song, or 0-11 if there are effects in the song.
        ELSE
        cp c
        ENDIF
        jr c,PLY_AKM_RT_NoteReference
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        sub 12                                  ;Can not be optimized with the code above, its value is automodified.
        jr z,PLY_AKM_RT_NoteAndEffects
        dec a
        jr z,PLY_AKM_RT_NoNoteMaybeEffects
                        ELSE
        sub 13
        jr z,PLY_AKM_RT_ReadWaitFlags          ;If no effects, directly check the wait flag.
                        ENDIF ;PLY_CFG_UseEffects
        dec a
        jr z,PLY_AKM_RT_NewEscapeNote
        ;15. Same escape note.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeNote)
        jr PLY_AKM_RT_AfterNoteRead
        
PLY_AKM_RT_NewEscapeNote:
        ;Reads the escape note, and stores it, it may be reused by other cells.
        ld a,(hl)
        ld (ix + PLY_AKM_Data_OffsetEscapeNote),a
        inc hl
        jr PLY_AKM_RT_AfterNoteRead

                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
PLY_AKM_RT_NoteAndEffects
        ;There is a "note and effects". This is a special case. A new data byte must be read, with the note and the normal flags.
        ;However, we use a "force effects" to mark the presence of effects.
        dec a     ;A is 0, give it any other value.
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        jr PLY_AKM_RT_GetDataByte
        
PLY_AKM_RT_NoNoteMaybeEffects
        ;Reads flag "instrument" to know what to do. The flags are diverted to indicate whether there are effects.
        bit 4,b     ;Effects?
        jr z,PLY_AKM_RT_ReadWaitFlags  ;No effects. As there is no note, logically, there are no instrument to read, so simply reads the Wait value.
        ld a,b          ;B is not 0, so it works.
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        jr PLY_AKM_RT_ReadWaitFlags
                        ENDIF ;PLY_CFG_UseEffects        
        
PLY_AKM_RT_NoteReference:
        ;A is the index of the note.
        exx
                ld l,a
                ld h,0
                add hl,bc
                ld a,(hl)
        exx

        ;A is the right note (0-127).
PLY_AKM_RT_AfterNoteRead:
        ;Adds the transposition.
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        add a,(ix + PLY_AKM_Data_OffsetTransposition)
                        ENDIF ;PLY_CFG_UseTranspositions
        ld (ix + PLY_AKM_Data_OffsetBaseNote),a

        ;Reads the instruments flags.
        ;------------------
        ld a,b
        and %110000
        jr z,PLY_AKM_RT_SameEscapeInstrument
        cp %010000
        jr z,PLY_AKM_RT_PrimaryInstrument
        cp %100000
        jr z,PLY_AKM_RT_SecondaryInstrument
        ;New escape instrument. Reads and stores it, it may be reused by other cells.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetEscapeInstrument),a
        jr PLY_AKM_RT_StoreCurrentInstrument

PLY_AKM_RT_SameEscapeInstrument:
        ;Use the latest escape instrument.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeInstrument)
        jr PLY_AKM_RT_StoreCurrentInstrument

PLY_AKM_RT_SecondaryInstrument:
        ;Use the secondary instrument.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SecondaryInstrument: ld a,0
        ELSE
        ld a,(PLY_AKM_SecondaryInstrument)
        ENDIF
        jr PLY_AKM_RT_StoreCurrentInstrument
        
PLY_AKM_RT_PrimaryInstrument:
        ;Use the primary instrument.
        IFNDEF PLY_AKM_Rom
PLY_AKM_PrimaryInstrument: ld a,0
        ELSE
        ld a,(PLY_AKM_PrimaryInstrument)
        ENDIF
        
PLY_AKM_RT_StoreCurrentInstrument:
        ;A is the instrument to play.
        exx
                ;Gets the address of the Instrument.
                add a,a         ;Only 127 instruments max.
                ld l,a
                ld h,0
                add hl,de       ;Adds to the Instrument Table.
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ;Reads the header of the Instrument.
                ld a,(hl)       ;Speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetInstrumentSpeed),a
                ;Stores the pointer on the data of the Instrument.
                ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        exx
        xor a
        ;Resets the step on the Instrument.
        ld (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep),a
        ;Resets the Track pitch.
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),a
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0),a
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1),a
        ;ld (ix + PLY_AKM_Data_OffsetTrackPitchDecimal),a               ;Shouldn't be needed, the difference shouldn't be noticeable.
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown

        ;Resets the offset on Arpeggio and Pitch tables.
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed)            ;The arpeggio speed must be reset.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a        
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetPitchOriginalSpeed)               ;The pitch speed must be reset.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
                        ENDIF ;PLY_CFG_UseEffect_PitchTable

        
        ;Reads the wait flags.
        ;----------------------
PLY_AKM_RT_ReadWaitFlags:
        ld a,b
        and %11000000
        jr z,PLY_AKM_RT_SameEscapeWait
        cp %01000000
        jr z,PLY_AKM_RT_PrimaryWait
        cp %10000000
        jr z,PLY_AKM_RT_SecondaryWait
        ;New escape wait. Reads and stores it, it may be reused by other cells.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetEscapeWait),a
        jr PLY_AKM_RT_StoreCurrentWait
                
PLY_AKM_RT_SameEscapeWait:
        ;Use the latest escape wait.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeWait)
        jr PLY_AKM_RT_StoreCurrentWait
        
PLY_AKM_RT_PrimaryWait:
        ;Use the primary wait.
        IFNDEF PLY_AKM_Rom
PLY_AKM_PrimaryWait: ld a,0
        ELSE
        ld a,(PLY_AKM_PrimaryWait)
        ENDIF
        jr PLY_AKM_RT_StoreCurrentWait

PLY_AKM_RT_SecondaryWait:
        ;Use the secondary wait.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SecondaryWait: ld a,0
        ELSE
        ld a,(PLY_AKM_SecondaryWait)
        ENDIF

PLY_AKM_RT_StoreCurrentWait:
        ;A is the wait to store.
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a

        ;--------------------
        ;Are there effects to read?
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        IFNDEF PLY_AKM_Rom
PLY_AKM_RT_ReadEffectsFlag: ld a,0
        ELSE
        ld a,(PLY_AKM_RT_ReadEffectsFlag)
        ENDIF
        or a
        jr nz,PLY_AKM_RT_ReadEffects
PLY_AKM_RT_AfterEffects:
                        ENDIF ;PLY_CFG_UseEffects
        ;No effects, or after they have been managed.
        ;Saves the new pointer on the Track.
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        ret
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
PLY_AKM_RT_ReadEffects:
        ;Resets the effect presence flag.
        xor a
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        
PLY_AKM_RT_ReadEffect:
        ld iy,PLY_AKM_EffectTable
        ;Reads effect number and possible data. All effect must jump to PLY_AKM_RT_ReadEffect_Return when finished.
        ld b,(hl)
        ld a,b
        inc hl
        
        and %1110
        ld e,a
        ld d,0
        add iy,de
        
        ;As a convenience, puts the effect nibble "to the right", for direct use.
        ld a,b
        rra
        rra
        rra
        rra
        and %1111               ;This sets the carry flag, useful for the effects code.
        ;Executes the effect code.
        jp (iy)
PLY_AKM_RT_ReadEffect_Return:
        ;More effects?
        bit 0,b
        jr nz,PLY_AKM_RT_ReadEffect
        jr PLY_AKM_RT_AfterEffects

PLY_AKM_RT_WaitLong:
        ;A 8-bit byte is encoded just after.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        jr PLY_AKM_RT_CellRead
PLY_AKM_RT_WaitShort:
        ;Only a 2-bit value is encoded.
        ld a,b
        rlca                     ;Transfers the bit 7/6 to 1/0. Thanks Hicks for the RCLA trick!
        rlca
        and %11
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        ;jr PLY_AKM_RT_CellRead
;Jumped to after the Cell has been read.
;IN:    HL = new value of the Track pointer. Must point after the read Cell.
PLY_AKM_RT_CellRead:
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        ret


;Manages the effects, if any. For the activated effects, modifies the internal data for the Track which data block is given.
;IN:    IX = data block of the Track.
;OUT:   IX, IY = unmodified.
;       C must NOT be modified!
;       DE' must NOT be modified!
PLY_AKM_ManageEffects:
                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ;Pitch up/down used?
        ld a,(ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed)
        or a
        jr z,PLY_AKM_ME_PitchUpDownFinished

        ;Adds the LSB of integer part and decimal part, using one 16 bits operation.
        ld l,(ix + PLY_AKM_Data_OffsetTrackPitchDecimal)
        ld h,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0)

        ld e,(ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 0)
        ld d,(ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 1)

        ld a,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1)

        ;Negative pitch?
        bit 7,d
        jr nz,PLY_AKM_ME_PitchUpDown_NegativeSpeed

PLY_AKM_ME_PitchUpDown_PositiveSpeed:
        ;Positive speed. Adds it to the LSB of the integer part, and decimal part.
        add hl,de

        ;Carry? Transmits it to the MSB of the integer part.
        adc 0
        jr PLY_AKM_ME_PitchUpDown_Save
PLY_AKM_ME_PitchUpDown_NegativeSpeed:
        ;Negative speed. Resets the sign bit. The encoded pitch IS positive.
        ;Subtracts it to the LSB of the integer part, and decimal part.
        res 7,d

        or a
        sbc hl,de

        ;Carry? Transmits it to the MSB of the integer part.
        sbc 0

PLY_AKM_ME_PitchUpDown_Save:
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1),a

        ld (ix + PLY_AKM_Data_OffsetTrackPitchDecimal),l
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0),h

PLY_AKM_ME_PitchUpDownFinished:
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown



        ;Manages the Arpeggio Table effect, if any.
        ;------------------------------------------
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed)
        or a
        jr z,PLY_AKM_ME_ArpeggioTableFinished

        ;Plays the arpeggio current note. It is suppose to be correct (not a loop).
        ;Plays it in any case, in order to manage some corner case with Force Arpeggio Speed.
        ld e,(ix + PLY_AKM_Data_OffsetPtArpeggioTable + 0)
        ld d,(ix + PLY_AKM_Data_OffsetPtArpeggioTable + 1)
        ld l,(ix + PLY_AKM_Data_OffsetPtArpeggioOffset)
        ld h,0
        add hl,de
        ld a,(hl)       ;Gets the Arpeggio value (b1-b7).
        sra a           ;Carry is 0, because the ADD above surely didn't overflow.
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a

        ;Moves forward, if the speed has been reached.
        ;Has the speed been reached?
        ld a,(ix + PLY_AKM_Data_OffsetArpeggioCurrentStep)
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        cp (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed)
                                ELSE
        cp (ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed)
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
        jr c,PLY_AKM_ME_ArpeggioTable_SpeedNotReached
        ;Resets the speed. Reads the next Arpeggio value.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),0
        
        ;Advances in the Arpeggio.
        inc (ix + PLY_AKM_Data_OffsetPtArpeggioOffset)
        inc hl          ;HL points on the next value. No need to add to the base offset like before, we have it.
        ld a,(hl)
        ;End of the Arpeggio?
        rra             ;Carry is 0.
        jr nc,PLY_AKM_ME_ArpeggioTableFinished
        ;End of the Arpeggio. The loop offset is now in A.
        ld l,a
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        jr PLY_AKM_ME_ArpeggioTableFinished
        
PLY_AKM_ME_ArpeggioTable_SpeedNotReached:
        inc a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a

PLY_AKM_ME_ArpeggioTableFinished:
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable



        ;Manages the Pitch Table effect, if any.
        ;------------------------------------------
                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetIsPitchTableUsed)
        or a
        ret z

        ;Plays the Pitch Table current note. It is suppose to be correct (not a loop).
        ;Plays it in any case, in order to manage some corner case with Force Pitch Speed.
        ;Reads the Pitch Table. Adds the Pitch base address to an offset.
        ld l,(ix + PLY_AKM_Data_OffsetPtPitchTable + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtPitchTable + 1)
        ld e,(ix + PLY_AKM_Data_OffsetPtPitchOffset)
        ld d,0
        add hl,de
        ld a,(hl)       ;Gets the Pitch value (b1-b7).
        sra a
        ;A = pitch note. It is converted to 16 bits.
        ;D is already 0.
        jp p,PLY_AKM_ME_PitchTableEndNotReached_Positive
        dec d
PLY_AKM_ME_PitchTableEndNotReached_Positive:
        ld (ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 0),a
        ld (ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 1),d
        
        ;Moves forward, if the speed has been reached.
        ;Has the speed been reached?
        ld a,(ix + PLY_AKM_Data_OffsetPitchCurrentStep)
                        IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        cp (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed)
                        ELSE
        cp (ix + PLY_AKM_Data_OffsetPitchOriginalSpeed)
                        ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        jr c,PLY_AKM_ME_PitchTable_SpeedNotReached
        ;Resets the speed, then reads the next Pitch value.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),0
        
        ;Advances in the Pitch.
        inc (ix + PLY_AKM_Data_OffsetPtPitchOffset)
        inc hl          ;HL points on the next value. No need to add to the base offset like before, we have it.
        ld a,(hl)
        ;End of the Pitch?
        rra             ;Carry is 0.
        ret nc
        ;End of the Pitch. The loop offset is now in A.
        ld l,a
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ret

PLY_AKM_ME_PitchTable_SpeedNotReached:
        inc a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
        ret
                        ENDIF ;PLY_CFG_UseEffects
        
        


;---------------------------------------------------------------------
;Sound stream.
;---------------------------------------------------------------------

;Plays the sound stream, filling the PSG registers table (but not playing it).
;The Instrument pointer must be updated as it evolves inside the Instrument.
;IN:    IX = Data block of the Track.
;       IY = Points at the beginning of the register structure related to the channel.
;       C = R7. Only bit 2 (sound) must be *set* to cut the sound if needed, and bit 5 (noise) must be *reset* if there is noise.
;       DE' = Period table. Must not be modified.
PLY_AKM_PlaySoundStream:
        ;Gets the pointer on the Instrument, from its base address and the offset.
        ld l,(ix + PLY_AKM_Data_OffsetPtInstrument + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtInstrument + 1)

        ;Reads the first byte of the cell of the Instrument. What type?
PLY_AKM_PSS_ReadFirstByte:
        ld a,(hl)
        ld b,a
        inc hl
        rra
        jr c,PLY_AKM_PSS_SoftOrSoftAndHard

        ;NoSoftNoHard or SoftwareToHardware
        rra
                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
        jr c,PLY_AKM_PSS_SoftwareToHardware
                        ENDIF ;PLY_CFG_UseHardwareSounds

        ;No software no hardware, or end of sound (loop)!
        ;End of sound?
        rra
        jr nc,PLY_AKM_PSS_NSNH_NotEndOfSound
        ;The sound loops/ends. Where?
        ld a,(hl)
        inc hl
        ld h,(hl)
        ld l,a
        ;As a sound always has at least one cell, we should safely be able to read its bytes without storing the instrument pointer.
        ;However, we do it anyway to remove the overhead of the Speed management: if looping, the same last line will be read,
        ;if several channels do so, it will be costly. So...
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        jr PLY_AKM_PSS_ReadFirstByte

PLY_AKM_PSS_NSNH_NotEndOfSound:
        ;No software, no hardware.
        ;-------------------------
        ;Stops the sound.
        set 2,c

        ;Volume. A now contains the volume on b0-3.
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        call PLY_AKM_PSS_Shared_AdjustVolume
                        ELSE
        and %1111
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        ld (iy + PLY_AKM_Registers_OffsetVolume),a

        ;Read noise?
        rl b
                        IFDEF PLY_CFG_NoSoftNoHard_Noise        ;CONFIG SPECIFIC
        call c,PLY_AKM_PSS_ReadNoise
                        ENDIF ;PLY_CFG_NoSoftNoHard_Noise
        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer

        ;Software sound, or Software and Hardware?
PLY_AKM_PSS_SoftOrSoftAndHard:
        rra
                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
        jr c,PLY_AKM_PSS_SoftAndHard
                        ENDIF ;PLY_CFG_UseHardwareSounds

        ;Software sound.
        ;-----------------
        ;A is the volume. Already shifted twice, so it can be used directly.
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        call PLY_AKM_PSS_Shared_AdjustVolume
                        ELSE
        and %1111
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        ld (iy + PLY_AKM_Registers_OffsetVolume),a

        ;Arp and/or noise?
        ld d,0          ;Default arpeggio.
        rl b
        jr nc,PLY_AKM_PSS_S_AfterArpAndOrNoise
        ld a,(hl)
        inc hl
        ;Noise?
        sra a
        ;A is now the signed Arpeggio. It must be kept.
        ld d,a
        ;Now takes care of the noise, if there is a Carry.
                        IFDEF PLY_CFG_SoftOnly_Noise          ;CONFIG SPECIFIC
        call c,PLY_AKM_PSS_ReadNoise
                        ENDIF ;PLY_CFG_SoftOnly_Noise
PLY_AKM_PSS_S_AfterArpAndOrNoise:

        ld a,d          ;Gets the instrument arpeggio, if any.
        call PLY_AKM_CalculatePeriodForBaseNote

        ;Read pitch?
        rl b
                        IFDEF PLY_CFG_SoftOnly_SoftwarePitch    ;CONFIG SPECIFIC
        call c,PLY_AKM_ReadPitchAndAddToPeriod
                        ENDIF ;PLY_CFG_SoftOnly_SoftwarePitch

        ;Stores the new period of this channel.
        exx
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodLSB),l
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodMSB),h
        exx

        ;The code below is shared!
        ;Stores the new instrument pointer, if Speed allows it.
        ;--------------------------------------------------
PLY_AKM_PSS_Shared_StoreInstrumentPointer:
        ;Checks the Instrument speed, and only stores the Instrument new pointer if the speed is reached.
        ld a,(ix + PLY_AKM_Data_OffsetInstrumentCurrentStep)
        cp (ix + PLY_AKM_Data_OffsetInstrumentSpeed)
        jr nc,PLY_AKM_PSS_S_SpeedReached
        ;Increases the current step.
        inc (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep)
        ret
PLY_AKM_PSS_S_SpeedReached:
        ;Stores the Instrument new pointer, resets the speed counter.
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        ld (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep),0
        ret


                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC

        ;Software and Hardware.
        ;----------------------------
PLY_AKM_PSS_SoftAndHard:
        ;Reads the envelope bit, the possible pitch, and sets the software period accordingly.
        call PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv
        ;Reads the hardware period.
        ld a,(hl)
        ld (PLY_AKM_Reg11),a
        inc hl
        ld a,(hl)
        ld (PLY_AKM_Reg12),a
        inc hl

        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer


        ;Software to Hardware.
        ;-------------------------
PLY_AKM_PSS_SoftwareToHardware:
        call PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv

        ;Now we can calculate the hardware period thanks to the ratio (contray to LW, it is NOT inverted, we can use it as-is).
        ld a,b
        rlca
        rlca
        rlca
        rlca
        and %111
        exx
                jr z,PLY_AKM_PSS_STH_RatioEnd
PLY_AKM_PSS_STH_RatioLoop:
                srl h
                rr l
                dec a 
                jr nz,PLY_AKM_PSS_STH_RatioLoop
                ;If carry, rounds the period.
                jr nc,PLY_AKM_PSS_STH_RatioEnd
                inc hl
PLY_AKM_PSS_STH_RatioEnd:
                ld a,l
                ld (PLY_AKM_Reg11),a
                ld a,h
                ld (PLY_AKM_Reg12),a
        exx

        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer

;A shared code for hardware sound.
;Reads the envelope bit in bit 1, arpeggio in bit 7 pitch in bit 2 from A. If pitch present, adds it to BC'.
;Converts the note to period, adds the instrument pitch, sets the software period of the channel.
;Also sets the hardware volume, and sets the hardware curve.
PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv:
        ;Envelope bit? R13 = 8 + 2 * (envelope bit?). Allows to have hardware envelope to 8 or 0xa.
        ;Shifted by 2 to the right, bit 1 is now envelope bit, which is perfect for us.
        and %10
        add a,8
        ld (PLY_AKM_SetReg13 + PLY_AKM_Offset1b),a

        ;Volume to 16 to trigger the hardware envelope.
        ld (iy + PLY_AKM_Registers_OffsetVolume),16

        ;Arpeggio?
        xor a                   ;Default arpeggio.
                        IFDEF PLY_AKM_ArpeggioInHardwareInstrument  ;CONFIG SPECIFIC
        bit 7,b                 ;Not shifted yet.
        jr z,PLY_AKM_PSS_Shared_REnvBAP_AfterArpeggio
        ;Reads the Arpeggio.
        ld a,(hl)
        inc hl
PLY_AKM_PSS_Shared_REnvBAP_AfterArpeggio:
                        ENDIF ;PLY_AKM_ArpeggioInHardwareInstrument
        ;Calculates the software period.
        call PLY_AKM_CalculatePeriodForBaseNote

        ;Pitch?
                        IFDEF PLY_AKM_PitchInHardwareInstrument  ;CONFIG SPECIFIC
        bit 2,b         ;Not shifted yet.
        call nz,PLY_AKM_ReadPitchAndAddToPeriod
                        ENDIF ;PLY_AKM_PitchInHardwareInstrument

        ;Stores the new period of this channel.
        exx
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodLSB),l
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodMSB),h
        exx
        ret

                        ENDIF ;PLY_CFG_UseHardwareSounds

                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
;Decreases the given volume (encoded in possibly more then 4 bits). If <0, forced to 0.
;IN:    A = volume, not ANDed.
;OUT:   A = new volume.
PLY_AKM_PSS_Shared_AdjustVolume:
        and %1111
        sub (ix + PLY_AKM_Data_OffsetTrackInvertedVolume)
        ret nc
        xor a
        ret
                        ENDIF ;PLY_CFG_UseEffect_SetVolume

;Reads and stores the noise pointed by HL, opens the noise channel.
;IN:    HL = instrument data where the noise is.
;OUT:   HL = HL++.
;MOD:   A.
                IFDEF PLY_AKM_USE_Noise          ;CONFIG SPECIFIC
PLY_AKM_PSS_ReadNoise:
        ld a,(hl)
        inc hl
        ld (PLY_AKM_NoiseRegister),a
        res 5,c                 ;Opens the noise channel.
        ret
                ENDIF ;PLY_AKM_USE_Noise
                
;Calculates the period according to the base note and put it in BC'. Used by both software and hardware codes.
;IN:    DE' = period table.
;       A = instrument arpeggio (0 if not used).
;OUT:   HL' = period.
;MOD:   A
PLY_AKM_CalculatePeriodForBaseNote:
        ;Gets the period from the current note.
        exx
                ld h,0
                add a,(ix + PLY_AKM_Data_OffsetBaseNote)                         ;Adds the instrument Arp to the base note (including the transposition).
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable            ;CONFIG SPECIFIC
                add (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue)               ;Adds the Arpeggio Table effect.
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                ;Finds the period from a single line of octave look-up table. This is slow...
                ;IN:    DE = PeriodTable.
                ;       A = note (>=0).
                ;OUT:   HL = period.
                ;       DE unmodified.
                ;       BC modified.

                ;Finds the octave.
dknr3 (void):   ld bc,255 * 256 + 12            ;B = Octave (>=0). Will be increased just below.
PLY_AKM_FindOctave_Loop:
                inc b           ;Next octave.
                sub c
                jr nc,PLY_AKM_FindOctave_Loop
                add a,c         ;Compensates the first iteration that may not have been useful.
        
                ;A = note inside the octave. Gets the period for the note, for the lowest octave.
                add a,a
                ld l,a
                ld h,0
                add hl,de       ;Points on the period on the lowest octave.
                ld a,(hl)
                inc hl
                ld h,(hl)       ;HL is the period on the lowest octave.
                ld l,a
                ;Divides the period as long as we haven't reached the octave.
                ld a,b
                or a
                jr z,PLY_AKM_FindOctave_OctaveShiftLoop_Finished
PLY_AKM_FindOctave_OctaveShiftLoop:
                srl h
                rr l
                djnz PLY_AKM_FindOctave_OctaveShiftLoop          ;Fortunately, does not modify the carry, used below.
PLY_AKM_FindOctave_OctaveShiftLoop_Finished:
                ;Rounds the period at the last iteration.
                jr nc,PLY_AKM_FindOctave_Finished
                inc hl
PLY_AKM_FindOctave_Finished:

                ;Adds the Pitch Table value, if used.
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
                ld a,(ix + PLY_AKM_Data_OffsetIsPitchTableUsed)
                or a
                jr z,PLY_AKM_CalculatePeriodForBaseNote_NoPitchTable
                ld c,(ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 0)
                ld b,(ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 1)
                add hl,bc
PLY_AKM_CalculatePeriodForBaseNote_NoPitchTable:
                        ENDIF ;PLY_CFG_UseEffect_PitchTable
                ;Adds the Track Pitch.
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
                ld c,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0)
                ld b,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1)
                add hl,bc
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
        exx
        ret

                        IFDEF PLY_AKM_PitchInInstrument  ;CONFIG SPECIFIC
;Reads the pitch in the Instruments (16 bits) and adds it to HL', which should contain the software period.
;IN:    HL = points on the pitch value.
;OUT:   HL = points after the pitch.
;MOD:   A, BC', HL' updated.
PLY_AKM_ReadPitchAndAddToPeriod:
        ;Reads 2 * 8 bits for the pitch. Slow...
        ld a,(hl)
        inc hl
        exx
                ld c,a                  ;Adds the read pitch to the note period.
        exx
        ld a,(hl)
        inc hl
        exx
                ld b,a
                add hl,bc
        exx
        ret
                        ENDIF ;PLY_AKM_PitchInInstrument







;---------------------------------------------------------------------
;Effect management.
;---------------------------------------------------------------------

                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
                        
;IN:    HL = points after the first byte.
;       A = data of the first byte on bits 0-3, the other bits are 0.
;       Carry = 0.
;       Z flag = 1 if the data is 0.
;       DE'= Instrument Table (not useful here). Do not modify!
;       IX = data block of the Track.
;       B = Do not modify!
;OUT:   HL = points after the data of the effect (maybe nothing to do).
;       Each effect must jump to PLY_AKM_RT_ReadEffect_Return.

                                IFDEF PLY_CFG_UseEffect_Reset           ;CONFIG SPECIFIC.
;Clears all the effects (volume, pitch table, arpeggio table).
PLY_AKM_EffectResetWithVolume:
        ;Inverted volume.
                                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetTrackInvertedVolume),a
                                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        xor a
        ;The inverted volume is managed above, so don't change it.
                                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),a
                                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed),a
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a      ;Contrary to the Pitch, the value must be reset.
                                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchTableUsed),a
                                        ENDIF ;PLY_CFG_UseEffect_PitchTable
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_Reset


;Changes the volume.
                                IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
PLY_AKM_EffectVolume:
        ld (ix + PLY_AKM_Data_OffsetTrackInvertedVolume),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_SetVolume

                                IFDEF PLY_CFG_UseEffect_ForceInstrumentSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Instrument. The current step is NOT changed.
PLY_AKM_EffectForceInstrumentSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetInstrumentSpeed),a
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForceInstrumentSpeed

                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Pitch. The current step is NOT changed.
PLY_AKM_EffectForcePitchSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
        ;ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a                ;No need to force next note of the Arpeggio. Faster, and more compliant with the C++ player.
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Arpeggio. The current step is NOT changed.
PLY_AKM_EffectForceArpeggioSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
        ;ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a             ;No need to force next note of the Arpeggio. Faster, and more compliant with the C++ player.
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed


;Effect table. Each entry jumps to an effect management code.
;Put after the code above so that the JR are within bound.
PLY_AKM_EffectTable:
                                IFDEF PLY_CFG_UseEffect_Reset           ;CONFIG SPECIFIC.
        jr PLY_AKM_EffectResetWithVolume                         ;000
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_Reset
                                
                                IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectVolume                                  ;001
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_SetVolume
        
                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectPitchUpDown                             ;010
                                ELSE
                                jr $
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown

                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectArpeggioTable                           ;011
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                               
                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectPitchTable                              ;100
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
        
                                IFDEF PLY_CFG_UseEffect_ForceInstrumentSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForceInstrumentSpeed                    ;101
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ForceInstrumentSpeed
        
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForceArpeggioSpeed                      ;110
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                   
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForcePitchSpeed                         ;111
                                ELSE
                                ;jr $   ;Last one. No need to encode it.
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed             


                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
;Pitch up/down effect, activation or stop.
PLY_AKM_EffectPitchUpDown:
        rra     ;Pitch present or pitch stop?
        jr nc,PLY_AKM_EffectPitchUpDown_Deactivated
        ;Activates the effect.
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),255
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 0),a
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 1),a
        jp PLY_AKM_RT_ReadEffect_Return
PLY_AKM_EffectPitchUpDown_Deactivated:
        ;Pitch stop.
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),0
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        

                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
;Arpeggio table effect, activation or stop.
PLY_AKM_EffectArpeggioTable:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed),a       ;Sets to 0 if the Arpeggio is stopped, or any other value if it starts.
        or a
        jr z,PLY_AKM_EffectArpeggioTable_Stop

        ;Gets the Arpeggio address.
        add a,a
        exx
                ld l,a
                ld h,0
        ;BC is modified, will be restored below.
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtArpeggios: ld bc,0            ;Arpeggio table does not encode entry 0, but the pointer points two bytes earlier to compensate.
        ELSE
        ld bc,(PLY_AKM_PtArpeggios)
        ENDIF
                add hl,bc
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ld a,(hl)               ;Reads the speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed),a
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
                ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                ld (ix + PLY_AKM_Data_OffsetPtArpeggioTable + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtArpeggioTable + 1),h
                
                ld bc,(PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b)
        exx

        ;Resets the offset of the Arpeggio to restart the Arpeggio, and forces a step to read immediately.
        xor a
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a
        jp PLY_AKM_RT_ReadEffect_Return
PLY_AKM_EffectArpeggioTable_Stop:
        ;Contrary to the Pitch, the Arpeggio must also be set to 0 when stopped.
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
;Pitch table effect, activation or stop.
;This is almost exactly the same code as for the Arpeggio, but I can't find a way to share it...
PLY_AKM_EffectPitchTable:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetIsPitchTableUsed),a  ;Sets to 0 if the Pitch is stopped, or any other value if it starts.
        or a
        jp z,PLY_AKM_RT_ReadEffect_Return
        
        ;Gets the Pitch address.
        add a,a
        exx
                ld l,a
                ld h,0
        ;BC is modified, will be restored below.
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtPitches: ld bc,0            ;Pitch table does not encode entry 0, but the pointer points two bytes earlier to compensate.
        ELSE
        ld bc,(PLY_AKM_PtPitches)
        ENDIF
                add hl,bc
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ld a,(hl)               ;Reads the speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetPitchOriginalSpeed),a
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
                ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
                ld (ix + PLY_AKM_Data_OffsetPtPitchTable + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtPitchTable + 1),h
                
                ld bc,(PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b)
        exx

        ;Resets the offset of the Pitch to restart the Pitch, and forces a step to read immediately.
        xor a
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_PitchTable





        
;Reads the next escape byte if A is 15, else returns A (0-14).
;IN:    HL= data in the effect
;       A = 0-15. bit 7-4 must be 0.
;OUT:   HL= may be increased if an escape value is read.
;       A = the 8-bit value.
PLY_AKM_EffectReadIfEscape:
        cp 15
        ret c
        ;Reads the escape value.
        ld a,(hl)
        inc hl
        ret

                        ENDIF ;PLY_CFG_UseEffects
                        
                        
;---------------------------------------------------------------------
;Data blocks for the three channels. Make sure NOTHING is added between, as the init clears everything!
;---------------------------------------------------------------------

        counter = 0
        ;Macro to declare a DB if RAM player, or an increasing EQU for ROM player.
        MACRO PLY_AKM_db label
                IFNDEF PLY_AKM_Rom
                        dkbs (void)
                        {label} db 0
                        dkbe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 1
                ENDIF
        ENDM
        
        ;Macro to declare a DW if RAM player, or an increasing (of two bytes) EQU for ROM player.
        MACRO PLY_AKM_dw label
                IFNDEF PLY_AKM_Rom
                        dkws (void)
                        {label} dw 0
                        dkwe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 2
                ENDIF
        ENDM
        

        ;Specific generic data for ROM (non-related to channels).
        ;Important: must be declared BEFORE the channel-specific data.
        IFDEF PLY_AKM_Rom
        PLY_AKM_dw PLY_AKM_PtInstruments
        PLY_AKM_dw PLY_AKM_PtArpeggios
        PLY_AKM_dw PLY_AKM_PtPitches
        PLY_AKM_dw PLY_AKM_PtLinker
        PLY_AKM_dw PLY_AKM_NoteIndexTable
        PLY_AKM_dw PLY_AKM_TrackIndex
        PLY_AKM_dw PLY_AKM_SaveSP
        
        PLY_AKM_db PLY_AKM_DefaultStartNoteInTracks
        PLY_AKM_db PLY_AKM_DefaultStartInstrumentInTracks
        PLY_AKM_db PLY_AKM_DefaultStartWaitInTracks
        PLY_AKM_db PLY_AKM_PrimaryInstrument
        PLY_AKM_db PLY_AKM_SecondaryInstrument
        PLY_AKM_db PLY_AKM_PrimaryWait
        PLY_AKM_db PLY_AKM_SecondaryWait
        PLY_AKM_db PLY_AKM_FlagNoteAndEffectInCell
        
        PLY_AKM_db PLY_AKM_PatternRemainingHeight
        PLY_AKM_db PLY_AKM_LinkerPreviousRemainingHeight
        PLY_AKM_db PLY_AKM_Speed
        PLY_AKM_db PLY_AKM_TickCounter
        PLY_AKM_db PLY_AKM_SetReg13Old
        PLY_AKM_db PLY_AKM_SetReg13
        PLY_AKM_db PLY_AKM_RT_ReadEffectsFlag
        
        ;RET table: db register, db value, dw code to jump to once the value is read.
        ;MUST be consistent with the RAM buffer!
PLY_AKM_Registers_RetTable equ PLY_AKM_ROM_Buffer + counter
        ;Reg 8.
        PLY_AKM_db PLY_AKM_Track1_Registers
        PLY_AKM_db PLY_AKM_Track1_Volume
        PLY_AKM_dw PLY_AKM_Track1_VolumeRet
        ;Reg 0.
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track1_SoftwarePeriodLSBRet
        ;Reg 1.
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track1_SoftwarePeriodMSBRet
        
        ;Reg 9.
        PLY_AKM_db PLY_AKM_Track2_Registers
        PLY_AKM_db PLY_AKM_Track2_Volume
        PLY_AKM_dw PLY_AKM_Track2_VolumeRet
        ;Reg 2.
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track2_SoftwarePeriodLSBRet
        ;Reg 3.
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track2_SoftwarePeriodMSBRet
        
        ;Reg 10.
        PLY_AKM_db PLY_AKM_Track3_Registers
        PLY_AKM_db PLY_AKM_Track3_Volume
        PLY_AKM_dw PLY_AKM_Track3_VolumeRet
        ;Reg 4.
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track3_SoftwarePeriodLSBRet
        ;Reg 5.
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track3_SoftwarePeriodMSBRet
        
        IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
                ;Reg 6.
                PLY_AKM_db PLY_AKM_NoiseRegisterPlaceholder
                PLY_AKM_db PLY_AKM_NoiseRegister        ;Misnomer: this is the value.
                PLY_AKM_dw PLY_AKM_NoiseRegisterRet
        ENDIF
        
        ;Reg 7.
        PLY_AKM_db PLY_AKM_MixerRegisterPlaceholder
        PLY_AKM_db PLY_AKM_MixerRegister        ;Misnomer: this is the value.
        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                PLY_AKM_dw PLY_AKM_MixerRegisterRet
                ;Reg 11.
                PLY_AKM_db PLY_AKM_Reg11Register
                PLY_AKM_db PLY_AKM_Reg11
                PLY_AKM_dw PLY_AKM_Reg11Ret
                ;Reg 12.
                PLY_AKM_db PLY_AKM_Reg12Register
                PLY_AKM_db PLY_AKM_Reg12
                PLY_AKM_dw PLY_AKM_Reg12Ret
                ;This one is a trick to send the register after R13 is managed.
                PLY_AKM_dw PLY_AKM_Reg12Ret2
        ENDIF
        
        PLY_AKM_dw PLY_AKM_RegsFinalRet
        
        
        ;The buffers for sound effects (if any), for each channel. They are treated apart, because they must be consecutive.
                IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
PLY_AKM_dw PLY_AKM_PtSoundEffectTable
                        REPEAT 3, channelNumber
PLY_AKM_dw PLY_AKM_Channel{channelNumber}_SoundEffectData
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectInvertedVolume
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectCurrentStep
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectSpeed
                if channelNumber != 3
                        counter = counter + 3 ;Padding of 3, but only necessary for channel 1 and 2.
                endif
                        REND
                ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS
        
        
        ENDIF ;PLY_AKM_Rom
        
;Data block for channel 1.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track1_Data:
        ELSE
                counterStartInTrackData = counter                    ;Duplicates the counter value to determine later the size of the track buffer.
        ENDIF
        PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      ;How many empty cells have to be waited. 0 = none.
        IFDEF PLY_AKM_Rom
                PLY_AKM_Track1_Data equ PLY_AKM_Track1_WaitEmptyCell
        ENDIF
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_Transposition
                        ENDIF ;PLY_CFG_UseTranspositions
        PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       ;Points at the start of the Track to read. Does not change, unless the Track changes.
        PLY_AKM_dw PLY_AKM_Track1_PtTrack                            ;Points on the next Cell of the Track to read. Evolves.
        PLY_AKM_db PLY_AKM_Track1_BaseNote                           ;Base note, such as the note played. The transposition IS included.
        PLY_AKM_db PLY_AKM_Track1_EscapeNote                         ;The escape note. The transposition is NOT included.
        PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   ;The escape instrument.
        PLY_AKM_db PLY_AKM_Track1_EscapeWait                         ;The escape wait.
        PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       ;Points on the Instrument, evolves.
        PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              ;The current step on the Instrument (>=0, till it reaches the Speed).
        PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    ;The Instrument speed (>=0).
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_TrackInvertedVolume
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsPitchUpDownUsed                  ;>0 if a Pitch Up/Down is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_TrackPitchInteger                   ;The integer part of the Track pitch. Evolves as the pitch goes up/down.
        PLY_AKM_db PLY_AKM_Track1_TrackPitchDecimal                   ;The decimal part of the Track pitch. Evolves as the pitch goes up/down.
        PLY_AKM_dw PLY_AKM_Track1_TrackPitchSpeed                     ;The integer and decimal part of the Track pitch speed. Is added to the Track Pitch every frame.
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsArpeggioTableUsed                 ;>0 if an Arpeggio Table is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_PtArpeggioTable                     ;Point on the base of the Arpeggio table, does not evolve.
        PLY_AKM_db PLY_AKM_Track1_PtArpeggioOffset                    ;Increases over the Arpeggio.
        PLY_AKM_db PLY_AKM_Track1_ArpeggioCurrentStep                 ;The arpeggio current step (>=0, increases).
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_ArpeggioCurrentSpeed                ;The arpeggio speed (>=0, may be changed by the Force Arpeggio Speed effect).
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
        PLY_AKM_db PLY_AKM_Track1_ArpeggioOriginalSpeed               ;The arpeggio original speed (>=0, NEVER changes for this arpeggio).
        PLY_AKM_db PLY_AKM_Track1_CurrentArpeggioValue                ;Value from the Arpeggio to add to the base note. Read even if the Arpeggio effect is deactivated.
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsPitchTableUsed                    ;>0 if a Pitch Table is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_PtPitchTable                        ;Points on the base of the Pitch table, does not evolve.
        PLY_AKM_db PLY_AKM_Track1_PtPitchOffset                       ;Increases over the Pitch.
        PLY_AKM_db PLY_AKM_Track1_PitchCurrentStep                    ;The Pitch current step (>=0, increases).
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_PitchCurrentSpeed                   ;The Pitch speed (>=0, may be changed by the Force Pitch Speed effect).
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        PLY_AKM_db PLY_AKM_Track1_PitchOriginalSpeed                  ;The Pitch original speed (>=0, NEVER changes for this pitch).
        PLY_AKM_dw PLY_AKM_Track1_CurrentPitchTableValue              ;16 bit value from the Pitch to add to the base note. Not read if the Pitch effect is deactivated.

                        ENDIF ;PLY_CFG_UseEffect_PitchTable

        IFNDEF PLY_AKM_Rom
PLY_AKM_Track1_Data_End:
PLY_AKM_Track1_Data_Size equ PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data
        ELSE
PLY_AKM_Track1_Data_Size = counter - counterStartInTrackData
PLY_AKM_Track1_Data_End = PLY_AKM_Track1_Data + PLY_AKM_Track1_Data_Size
        ENDIF

PLY_AKM_Data_OffsetWaitEmptyCell                 equ PLY_AKM_Track1_WaitEmptyCell - PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetTransposition                 equ PLY_AKM_Track1_Transposition - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseTranspositions
PLY_AKM_Data_OffsetPtStartTrack                  equ PLY_AKM_Track1_PtStartTrack - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtTrack                       equ PLY_AKM_Track1_PtTrack - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetBaseNote                      equ PLY_AKM_Track1_BaseNote - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeNote                    equ PLY_AKM_Track1_EscapeNote - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeInstrument              equ PLY_AKM_Track1_EscapeInstrument - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeWait                    equ PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetSecondaryInstrument           equ PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtInstrument                  equ PLY_AKM_Track1_PtInstrument - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetInstrumentCurrentStep         equ PLY_AKM_Track1_InstrumentCurrentStep - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetInstrumentSpeed               equ PLY_AKM_Track1_InstrumentSpeed - PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetTrackInvertedVolume           equ PLY_AKM_Track1_TrackInvertedVolume - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsPitchUpDownUsed             equ PLY_AKM_Track1_IsPitchUpDownUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchInteger             equ PLY_AKM_Track1_TrackPitchInteger - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchDecimal             equ PLY_AKM_Track1_TrackPitchDecimal - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchSpeed               equ PLY_AKM_Track1_TrackPitchSpeed - PLY_AKM_Track1_Data
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsArpeggioTableUsed           equ PLY_AKM_Track1_IsArpeggioTableUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtArpeggioTable               equ PLY_AKM_Track1_PtArpeggioTable - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtArpeggioOffset              equ PLY_AKM_Track1_PtArpeggioOffset - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetArpeggioCurrentStep           equ PLY_AKM_Track1_ArpeggioCurrentStep - PLY_AKM_Track1_Data
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetArpeggioCurrentSpeed          equ PLY_AKM_Track1_ArpeggioCurrentSpeed - PLY_AKM_Track1_Data
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
PLY_AKM_Data_OffsetArpeggioOriginalSpeed         equ PLY_AKM_Track1_ArpeggioOriginalSpeed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetCurrentArpeggioValue          equ PLY_AKM_Track1_CurrentArpeggioValue - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsPitchTableUsed              equ PLY_AKM_Track1_IsPitchTableUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtPitchTable                  equ PLY_AKM_Track1_PtPitchTable - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtPitchOffset                 equ PLY_AKM_Track1_PtPitchOffset - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPitchCurrentStep              equ PLY_AKM_Track1_PitchCurrentStep - PLY_AKM_Track1_Data
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetPitchCurrentSpeed             equ PLY_AKM_Track1_PitchCurrentSpeed - PLY_AKM_Track1_Data
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
PLY_AKM_Data_OffsetPitchOriginalSpeed            equ PLY_AKM_Track1_PitchOriginalSpeed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetCurrentPitchTableValue        equ PLY_AKM_Track1_CurrentPitchTableValue - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_PitchTable

;Data block for channel 2.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track2_Data:
dkbs (void):
        ds PLY_AKM_Track1_Data_Size, 0
dkbe (void):
PLY_AKM_Track2_Data_End:
        ELSE
PLY_AKM_Track2_Data equ PLY_AKM_Track1_Data + PLY_AKM_Track1_Data_Size
PLY_AKM_Track2_Data_End equ PLY_AKM_Track2_Data + PLY_AKM_Track1_Data_Size
        ENDIF
PLY_AKM_Track2_WaitEmptyCell equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetWaitEmptyCell
PLY_AKM_Track2_PtTrack equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtTrack
PLY_AKM_Track2_PtInstrument equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtInstrument
PLY_AKM_Track2_EscapeNote equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeNote
PLY_AKM_Track2_EscapeInstrument equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeInstrument
PLY_AKM_Track2_EscapeWait equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeWait

;Data block for channel 3.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track3_Data:
dkbs (void):
        ds PLY_AKM_Track1_Data_Size, 0
dkbe (void):
PLY_AKM_Track3_Data_End:
        ELSE
PLY_AKM_Track3_Data equ PLY_AKM_Track2_Data + PLY_AKM_Track1_Data_Size
PLY_AKM_Track3_Data_End equ PLY_AKM_Track3_Data + PLY_AKM_Track1_Data_Size

PLY_AKM_ROM_Buffer_End equ PLY_AKM_Track3_Data_End
PLY_AKM_ROM_BufferSize equ PLY_AKM_ROM_Buffer_End - PLY_AKM_ROM_Buffer
        
        expectedRomBufferSize = 199             ;Just to detect if the buffer grows.
                IFNDEF PLY_AKM_MANAGE_SOUND_EFFECTS
                        assert PLY_AKM_ROM_BufferSize <= expectedRomBufferSize               ;Decreases when using the Player Configuration.
                ELSE
                        assert PLY_AKM_ROM_BufferSize <= (expectedRomBufferSize + 23)        ;With sound effects, it takes a bit more memory.
                ENDIF
        ENDIF
        
        
        

PLY_AKM_Track3_WaitEmptyCell equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetWaitEmptyCell
PLY_AKM_Track3_PtTrack equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtTrack
PLY_AKM_Track3_PtInstrument equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtInstrument
PLY_AKM_Track3_EscapeNote equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeNote
PLY_AKM_Track3_EscapeInstrument equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeInstrument
PLY_AKM_Track3_EscapeWait equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeWait

        ;Makes sure the structure all have the same size!
        ASSERT (PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data) == (PLY_AKM_Track2_Data_End - PLY_AKM_Track2_Data)
        ASSERT (PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data) == (PLY_AKM_Track3_Data_End - PLY_AKM_Track3_Data)
        ;No holes between the blocks, the init makes a LDIR to clear everything!
        ASSERT PLY_AKM_Track1_Data_End == PLY_AKM_Track2_Data
        ASSERT PLY_AKM_Track2_Data_End == PLY_AKM_Track3_Data



;---------------------------------------------------------------------
;Register block for all the channels. They are "polluted" with pointers to code because all this
;is actually a RET table!
;---------------------------------------------------------------------
;DB register, DB value then DW code to jump to once the value is read.
        IFNDEF PLY_AKM_Rom              ;For ROM, a table is generated.
PLY_AKM_Registers_RetTable:
PLY_AKM_Track1_Registers:
dkbs (void):   db 8
PLY_AKM_Track1_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 0
PLY_AKM_Track1_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 1
PLY_AKM_Track1_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

PLY_AKM_Track2_Registers:
dkbs (void):   db 9
PLY_AKM_Track2_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 2
PLY_AKM_Track2_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 3
PLY_AKM_Track2_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):


PLY_AKM_Track3_Registers:
dkbs (void):   db 10
PLY_AKM_Track3_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 4
PLY_AKM_Track3_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 5
PLY_AKM_Track3_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

;Generic registers.
                        IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
dkbs (void):   db 6
PLY_AKM_NoiseRegister: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):
                        ENDIF ;PLY_AKM_USE_NoiseRegister

dkbs (void):   db 7
PLY_AKM_MixerRegister: db 0
dkbe (void):
        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
dkps (void):           dw PLY_AKM_SendPsgRegister
dkpe (void):
        
dkbs (void):    db 11
PLY_AKM_Reg11:  db 0
dkbe (void):
dkps (void):           dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):    db 12
PLY_AKM_Reg12:  db 0
dkbe (void):
dkps (void):           dw PLY_AKM_SendPsgRegisterR13
                ;This one is a trick to send the register after R13 is managed.
                dw PLY_AKM_SendPsgRegisterAfterPop
dkpe (void):
        ENDIF ;PLY_CFG_UseHardwareSounds
dkps (void):   dw PLY_AKM_SendPsgRegisterEnd
dkpe (void):

        ENDIF ;PLY_AKM_Rom


PLY_AKM_Registers_OffsetVolume equ PLY_AKM_Track1_Volume - PLY_AKM_Track1_Registers
PLY_AKM_Registers_OffsetSoftwarePeriodLSB equ PLY_AKM_Track1_SoftwarePeriodLSB - PLY_AKM_Track1_Registers
PLY_AKM_Registers_OffsetSoftwarePeriodMSB equ PLY_AKM_Track1_SoftwarePeriodMSB - PLY_AKM_Track1_Registers

;The period table for the first octave only.
dkws (void):
        IFDEF PLY_AKM_HARDWARE_PSG_1000000_HZ           ;PSG running to 1000000 Hz.
PLY_AKM_PeriodTable:
        dw 3822,3608,3405,3214,3034,2863,2703,2551,2408,2273,2145,2025          ; Octave 0.
        ENDIF

        IFDEF PLY_AKM_HARDWARE_PSG_1773400_HZ           ;PSG running to 1773400 Hz.
PLY_AKM_PeriodTable:
        dw 6778, 6398, 6039, 5700, 5380, 5078, 4793, 4524, 4270, 4030, 3804, 3591	; Octave 0.
        ENDIF

        IFDEF PLY_AKM_HARDWARE_PSG_1789773_HZ           ;PSG running to 1789773 Hz.
PLY_AKM_PeriodTable:
        dw 6841, 6457, 6095, 5753, 5430, 5125, 4837, 4566, 4310, 4068, 3839, 3624,      ; Octave 0
        ENDIF

        IFDEF PLY_AKM_HARDWARE_PSG_1750000_HZ           ;PSG running to 1750000 Hz.
PLY_AKM_PeriodTable:
        dw 6689, 6314, 5959, 5625, 5309, 5011, 4730, 4464, 4214, 3977, 3754, 3543	; Octave 0.
        ENDIF
dkwe (void):
PLY_AKM_PeriodTable_End:
        assert PLY_AKM_PeriodTable_End - PLY_AKM_PeriodTable == 12 * 2     ;12 notes must be given.

PLY_AKM_End:



Full Source

Show Source
;       Arkos Tracker 2 AKM (Minimalist) player (format V0).
;       By Targhan/Arkos.
;
;       Thanks to Hicks/Vanity for two small (but relevant!) optimizations.

;       This compiles with RASM. Check the compatibility page on the Arkos Tracker 2 website, it contains a source converter to any Z80 assembler!;

;       This is a Minimalist player. Only a subset of the generic player is used. Use this player for 4k demo or other productions
;       with a tight memory limitation. However, this remains a versatile and powerful player, so it may fit any production!
;
;       Though the player is optimized in speed, it is much slower than the generic one or the AKY player.
;       With effects used at the same time, it can reach 45 scanlines on a CPC, plus some few more if you are using sound effects.
;       So it's about as fast as the Soundtrakker 128 player, but smaller and more powerful (so what are you complaining about?).
;
;       The player uses the stack for optimizations. Make sure the interruptions are disabled before it is called.
;       The stack pointer is saved at the beginning and restored at the end.
;
;       Target hardware:
;       ---------------
;       This code can target Amstrad CPC, MSX, Spectrum and Pentagon. By default, it targets Amstrad CPC.
;       Simply use one of the follow line (BEFORE this player):
;       PLY_AKM_HARDWARE_CPC = 1
;       PLY_AKM_HARDWARE_MSX = 1
;       PLY_AKM_HARDWARE_SPECTRUM = 1
;       PLY_AKM_HARDWARE_PENTAGON = 1
;       Note that the PRESENCE of this variable is tested, NOT its value.

;       Some severe optimizations of CPU/memory can be performed:
;       ---------------------------------------------------------
;       - Use the Player Configuration of Arkos Tracker 2 to generate a configuration file to be included at the beginning of this player.
;         It will disable useless features according to your songs! Check the manual for more details, or more simply the testers.

;       Sound effects:
;       --------------
;       Sound effects are disabled by default. Declare PLY_AKM_MANAGE_SOUND_EFFECTS to enable it:
;       PLY_AKM_MANAGE_SOUND_EFFECTS = 1
;       Check the sound effect tester to see how it enables it.
;       Note that the PRESENCE of this variable is tested, NOT its value.
;
;       ROM
;       ----------------------
;       To use a ROM player (no automodification, use of a small buffer to put in RAM):
;       PLY_AKM_Rom = 1
;       PLY_AKM_ROM_Buffer = #4000 (or wherever).
;       This makes the player a bit slower and slightly bigger.
;       The buffer is PLY_AKM_ROM_BufferSize bytes long (199 bytes max).
;
;       -------------------------------------------------------
PLY_AKM_Start:


        ;Checks the hardware. Only one must be selected.
PLY_AKM_HardwareCounter = 0
        IFDEF PLY_AKM_HARDWARE_CPC
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
        ENDIF
        IFDEF PLY_AKM_HARDWARE_MSX
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_MSX = 1
        ENDIF
        IFDEF PLY_AKM_HARDWARE_SPECTRUM
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON = 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_MSX = 1
        ENDIF
        IFDEF PLY_AKM_HARDWARE_PENTAGON
                PLY_AKM_HardwareCounter = PLY_AKM_HardwareCounter + 1
                PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON = 1
        ENDIF
        IF PLY_AKM_HardwareCounter > 1
                FAIL 'Only one hardware must be selected!'
        ENDIF
        ;By default, selects the Amstrad CPC.
        IF PLY_AKM_HardwareCounter == 0
                PLY_AKM_HARDWARE_CPC = 1
        ENDIF


        ;Disark macro: Word region Start.
        disarkCounter = 0
        IFNDEF dkws
        MACRO dkws
PLY_AKM_DisarkWordRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Word region End.
        IFNDEF dkwe
        MACRO dkwe
PLY_AKM_DisarkWordRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        
        ;Disark macro: Pointer region Start.
        disarkCounter = 0
        IFNDEF dkps
        MACRO dkps
PLY_AKM_DisarkPointerRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Pointer region End.
        IFNDEF dkpe
        MACRO dkpe
PLY_AKM_DisarkPointerRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        
        ;Disark macro: Byte region Start.
        disarkCounter = 0
        IFNDEF dkbs
        MACRO dkbs
PLY_AKM_DisarkByteRegionStart_{disarkCounter}
        ENDM
        ENDIF
        ;Disark macro: Byte region End.
        IFNDEF dkbe
        MACRO dkbe
PLY_AKM_DisarkByteRegionEnd_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF

        ;Disark macro: Force "No Reference Area" for 3 bytes (ld hl,xxxx).
        IFNDEF dknr3
        MACRO dknr3
PLY_AKM_DisarkForceNonReferenceDuring3_{disarkCounter}:
        disarkCounter = disarkCounter + 1
        ENDM
        ENDIF
        

PLY_AKM_USE_HOOKS: equ 0                                 ;Use hooks for external calls? 0 if the Init/Play methods are directly called, will save a few bytes.

        ifndef PLY_AKM_STOP_SOUNDS
PLY_AKM_STOP_SOUNDS: equ 0                               ;1 to have the "stop sounds" code. Set it to 0 if you never plan on stopping your music.
        endif
        
        ;Hooks for external calls. Can be removed if not needed.
        if PLY_AKM_USE_HOOKS
		assert PLY_AKM_Start == $		;Makes sure no extra byte were inserted before the hooks.
                jp PLY_AKM_Init          ;Player + 0.
                jp PLY_AKM_Play          ;Player + 3.
                if PLY_AKM_STOP_SOUNDS
                jp PLY_AKM_Stop          ;Player + 6.
                endif
        endif
        
        ;Includes the sound effects player, if wanted. Important to do it as soon as possible, so that
        ;its code can react to the Player Configuration and possibly alter it.
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
		include "PlayerAkm_SoundEffects.asm"
        ENDIF
        ;[[INSERT_SOUND_EFFECT_SOURCE]]                 ;A tag for test units. Don't touch or you're dead.

        ;Is there a loaded Player Configuration source? If no, use a default configuration.
        IFNDEF PLY_CFG_ConfigurationIsPresent
                PLY_CFG_UseTranspositions = 1
                PLY_CFG_UseSpeedTracks = 1
                PLY_CFG_UseEffects = 1
                PLY_CFG_UseHardwareSounds = 1
                PLY_CFG_NoSoftNoHard_Noise = 1
                PLY_CFG_SoftOnly_Noise = 1
                PLY_CFG_SoftOnly_SoftwarePitch = 1
                PLY_CFG_SoftToHard_SoftwarePitch = 1
                PLY_CFG_SoftToHard_SoftwareArpeggio = 1
                PLY_CFG_SoftAndHard_SoftwarePitch = 1
                PLY_CFG_SoftAndHard_SoftwareArpeggio = 1
                PLY_CFG_UseEffect_ArpeggioTable = 1
                PLY_CFG_UseEffect_ForcePitchTableSpeed = 1
                PLY_CFG_UseEffect_ForceArpeggioSpeed = 1
                PLY_CFG_UseEffect_ForceInstrumentSpeed = 1
                PLY_CFG_UseEffect_PitchUp = 1
                PLY_CFG_UseEffect_PitchDown = 1
                PLY_CFG_UseEffect_PitchTable = 1
                PLY_CFG_UseEffect_SetVolume = 1
                PLY_CFG_UseEffect_Reset = 1
        ENDIF
        
        ;Agglomerates some flags, because they are treated the same way by this player.
        ;--------------------------------------------------
        ;Creates a flag for pitch in instrument, and also pitch in hardware.
        IFDEF PLY_CFG_SoftOnly_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftToHard_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
                PLY_AKM_PitchInHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftAndHard_SoftwarePitch
                PLY_AKM_PitchInInstrument = 1
                PLY_AKM_PitchInHardwareInstrument = 1
        ENDIF
        ;A flag for Arpeggios in Instrument, both in software and hardware.
        IFDEF PLY_CFG_SoftOnly_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftToHard_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
                PLY_AKM_ArpeggioInHardwareInstrument = 1
        ENDIF
        IFDEF PLY_CFG_SoftAndHard_SoftwareArpeggio
                PLY_AKM_ArpeggioInSoftwareOrHardwareInstrument = 1
                PLY_AKM_ArpeggioInHardwareInstrument = 1
        ENDIF      
        
        ;A flag if noise is used (noise in hardware not tested, not present in this format).
        IFDEF PLY_CFG_NoSoftNoHard_Noise
                PLY_AKM_USE_Noise = 1
        ENDIF
        IFDEF PLY_CFG_SoftOnly_Noise
                PLY_AKM_USE_Noise = 1
        ENDIF
        ;The noise is managed? Then the noise register access must be compiled.
        IFDEF PLY_AKM_USE_Noise
                PLY_AKM_USE_NoiseRegister = 1
        ENDIF
        
        ;Mixing Pitch up/down effects.
        IFDEF PLY_CFG_UseEffect_PitchUp
                PLY_AKM_USE_EffectPitchUpDown = 1
        ENDIF
        IFDEF PLY_CFG_UseEffect_PitchDown
                PLY_AKM_USE_EffectPitchUpDown = 1
        ENDIF
        
        ;If the Force Arpeggio Speed if used, it means the ArpeggioTable effect must also be!
        IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed
                PLY_CFG_UseEffect_ArpeggioTable = 1
        ENDIF
        ;If the Force Pitch Table Speed if used, it means the PitchTable effect must also be!
        IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed
                PLY_CFG_UseEffect_PitchTable = 1
        ENDIF

;A nice trick to manage the offset using the same instructions, according to the player (ROM or not).
        IFDEF PLY_AKM_Rom
PLY_AKM_Offset1b: equ 0
PLY_AKM_Offset2b: equ 0         ;Used for instructions such as ld iyh,xx
        ELSE
PLY_AKM_Offset1b: equ 1
PLY_AKM_Offset2b: equ 2
        ENDIF

;Initializes the song. MUST be called before actually playing the song.
;IN:    HL = Address of the song.
;       A = Index of the subsong to play (>=0).
PLY_AKM_InitDisarkGenerateExternalLabel:
PLY_AKM_Init:
        ;Reads the Song header.
        ;Reads the pointers to the various index tables.
        ld de,PLY_AKM_PtInstruments + PLY_AKM_Offset1b
        ldi
        ldi
                        IFDEF PLY_CFG_UseEffects                           ;CONFIG SPECIFIC
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable      ;CONFIG SPECIFIC
        ld de,PLY_AKM_PtArpeggios + PLY_AKM_Offset1b
        ldi
        ldi
                                ELSE
                                inc hl
                                inc hl
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                                IFDEF PLY_CFG_UseEffect_PitchTable         ;CONFIG SPECIFIC
        ld de,PLY_AKM_PtPitches + PLY_AKM_Offset1b
        ldi
        ldi
                                ELSE
                                inc hl
                                inc hl
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
                        ELSE
dknr3 (void):  ld de,4
        add hl,de
                        ENDIF ;PLY_CFG_UseEffects
                        
        ;Finds the address of the Subsong.
        ;HL points on the table, adds A * 2.
        ;Possible optimization: possible to set the Subsong directly.
        add a,a
        ld e,a
        ld d,0
        add hl,de
        ld a,(hl)
        inc hl
        ld h,(hl)
        ld l,a

        ;Reads the header of the Subsong, copies the values inside the code via a table.
        ld ix,PLY_AKM_InitVars_Start
        ld a,(PLY_AKM_InitVars_End - PLY_AKM_InitVars_Start) / 2
PLY_AKM_InitVars_Loop:
        ld e,(ix + 0)
        ld d,(ix + 1)
        inc ix
        inc ix
        ldi
        dec a
        jr nz,PLY_AKM_InitVars_Loop

        ;A is zero, no need to reset it.        
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a       ;Optimization: this line can be removed if there is no need to reset the song (warning, A is used below).

        ;Stores the Linker address, just after.
        ex de,hl
        ld hl,PLY_AKM_PtLinker + PLY_AKM_Offset1b
        ld (hl),e
        inc hl
        ld (hl),d

        ;A big LDIR to erase all the data blocks. Optimization: can be removed if there is no need to reset the song.
        ;A is considered 0!
        ld hl,PLY_AKM_Track1_Data
        ld de,PLY_AKM_Track1_Data + 1
dknr3 (void):  ld bc,PLY_AKM_Track3_Data_End - PLY_AKM_Track1_Data - 1
        ld (hl),a
        ldir
        
        ;Resets this flag. Especially important for ROM.
        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
                ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        ENDIF

        ;Forces a new line.
        ld a,(PLY_AKM_Speed + PLY_AKM_Offset1b)
        dec a
        ld (PLY_AKM_TickCounter + PLY_AKM_Offset1b),a

        ;Reads the first instrument, the empty one, and set-ups the pointers to the instrument to read.
        ;Optimization: needed if the song doesn't start with an instrument on all the channels. Else, it can be removed.
        ld hl,(PLY_AKM_PtInstruments + PLY_AKM_Offset1b)
        ld e,(hl)
        inc hl
        ld d,(hl)
        inc de          ;Skips the header.
        ld (PLY_AKM_Track1_PtInstrument),de
        ld (PLY_AKM_Track2_PtInstrument),de
        ld (PLY_AKM_Track3_PtInstrument),de
        
        ;If sound effects, clears the SFX state.
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
dknr3 (void):          ld hl,0
                ld (PLY_AKM_Channel1_SoundEffectData),hl
                ld (PLY_AKM_Channel2_SoundEffectData),hl
                ld (PLY_AKM_Channel3_SoundEffectData),hl
        ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS
        
        ;For ROM, generates the RET table.
        IFDEF PLY_AKM_Rom
                ld ix,PLY_AKM_RegistersForRom           ;Source.
                ld iy,PLY_AKM_Registers_RetTable        ;Destination.
                ld bc,PLY_AKM_SendPsgRegister
dknr3 (void):          ld de,4
PLY_AKM_InitRom_Loop:
                ld a,(ix)                 ;Gets the register.
                ld h,a
                inc ix
                and %00111111
                ld (iy + 0),a             ;Writes the register.
                ld (iy + 1),0             ;Value is 0 for now.
                ld a,h
                and %11000000
                jr nz,PLY_AKM_InitRom_Special
                ;Encodes the "normal" SendPsgRegister code address.
                ld (iy + 2),c
                ld (iy + 3),b
                add iy,de
                jr PLY_AKM_InitRom_Loop
PLY_AKM_InitRom_Special:
                IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                rl h
                jr c,PLY_AKM_InitRom_WriteEndCode
                ;Bit 6 must be set if we came here.
                ld bc,PLY_AKM_SendPsgRegisterR13
                ld (iy + 2),c
                ld (iy + 3),b
                ld bc,PLY_AKM_SendPsgRegisterAfterPop ;This one is a trick to send the register after R13 is managed.
                ld (iy + 4),c
                ld (iy + 5),b
                add iy,de               ;Only advance of 4, the code belows expects that.
                ENDIF ;PLY_CFG_UseHardwareSounds
                
PLY_AKM_InitRom_WriteEndCode:
                ld bc,PLY_AKM_SendPsgRegisterEnd
                ld (iy + 2),c
                ld (iy + 3),b
        ENDIF
        ret
        
        ;If ROM, the registers to send, IN THE ORDER they are declared in the ROM buffer!
        ;Bit 7 if ends (end DW to encode). Exclusive to bit 6.
        ;Bit 6 if R13/AfterPop the end DW to encode. Exclusive to bit 7.
        IFDEF PLY_AKM_Rom
PLY_AKM_RegistersForRom:
dkbs (void):
                db 8, 0, 1, 9, 2, 3, 10, 4, 5
                IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
                        db 6
                ENDIF
                IFNDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                        db 7 + 128
                ELSE
                        db 7, 11, 12 + 64     ;13 is NOT declared, special case.
                ENDIF
dkbe (void):
        ENDIF

;Addresses where to put the header data.
PLY_AKM_InitVars_Start:
dkps (void):
        dw PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b
        dw PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b + 1
        dw PLY_AKM_TrackIndex + PLY_AKM_Offset1b
        dw PLY_AKM_TrackIndex + PLY_AKM_Offset1b + 1
        dw PLY_AKM_Speed + PLY_AKM_Offset1b
        dw PLY_AKM_PrimaryInstrument + PLY_AKM_Offset1b
        dw PLY_AKM_SecondaryInstrument + PLY_AKM_Offset1b
        dw PLY_AKM_PrimaryWait + PLY_AKM_Offset1b
        dw PLY_AKM_SecondaryWait + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartNoteInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartInstrumentInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_DefaultStartWaitInTracks + PLY_AKM_Offset1b
        dw PLY_AKM_FlagNoteAndEffectInCell + PLY_AKM_Offset1b
dkpe (void):
PLY_AKM_InitVars_End:


;Cuts the channels, stopping all sounds.
        if PLY_AKM_STOP_SOUNDS
PLY_AKM_StopDisarkGenerateExternalLabel:
PLY_AKM_Stop:
        ld (PLY_AKM_SaveSP + PLY_AKM_Offset1b),sp

        xor a
        ld (PLY_AKM_Track1_Volume),a
        ld (PLY_AKM_Track2_Volume),a
        ld (PLY_AKM_Track3_Volume),a
        IFDEF PLY_AKM_HARDWARE_MSX
                ld a,%10111111          ;On MSX, bit 7 must be 1, bit 6 0.
        ELSE
                ld a,%00111111          ;On CPC, bit 6 must be 0. Other platforms don't care.
        ENDIF
        ld (PLY_AKM_MixerRegister),a
        jp PLY_AKM_SendPsg
        endif ;PLY_AKM_STOP_SOUNDS



;Plays one frame of the song. It MUST have been initialized before.
;The stack is saved and restored, but is diverted, so watch out for the interruptions.
PLY_AKM_PlayDisarkGenerateExternalLabel:
PLY_AKM_Play:
        ld (PLY_AKM_SaveSP + PLY_AKM_Offset1b),sp

        ;Reads a new line?
        IFNDEF PLY_AKM_Rom
PLY_AKM_TickCounter: ld a,0
        inc a
PLY_AKM_Speed: cp 1                       ;Speed (>0).
        ELSE
        ld a,(PLY_AKM_Speed)
        ld b,a
        ld a,(PLY_AKM_TickCounter)
        inc a
        cp b
        ENDIF
        jp nz,PLY_AKM_TickCounterManaged

        ;A new line must be read. But have we reached the end of the Pattern?
        IFNDEF PLY_AKM_Rom
PLY_AKM_PatternRemainingHeight: ld a,0              ;Height. If 0, end of the pattern.
        ELSE
        ld a,(PLY_AKM_PatternRemainingHeight)
        ENDIF
        sub 1
        jr c,PLY_AKM_Linker
        ;Pattern not ended. No need to read the Linker.
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a
        jr PLY_AKM_ReadLine

        ;New pattern. Reads the Linker.
PLY_AKM_Linker:
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_TrackIndex: ld de,0              ;DE' points on the Track Index. Useful when new Tracks are found.
        ELSE
        ld de,(PLY_AKM_TrackIndex)
        ENDIF
        exx
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtLinker: ld hl,0
        ELSE
        ld hl,(PLY_AKM_PtLinker)
        ENDIF
PLY_AKM_LinkerPostPt:
        ;Resets the possible empty cell counter of each Track.
        xor a
        ld (PLY_AKM_Track1_WaitEmptyCell),a
        ld (PLY_AKM_Track2_WaitEmptyCell),a
        ld (PLY_AKM_Track3_WaitEmptyCell),a
        ;On new pattern, the escape note/instrument/wait values are set for each Tracks.
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartNoteInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartNoteInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeNote),a
        ld (PLY_AKM_Track2_EscapeNote),a
        ld (PLY_AKM_Track3_EscapeNote),a
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartInstrumentInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartInstrumentInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeInstrument),a
        ld (PLY_AKM_Track2_EscapeInstrument),a
        ld (PLY_AKM_Track3_EscapeInstrument),a
        IFNDEF PLY_AKM_Rom
PLY_AKM_DefaultStartWaitInTracks: ld a,0
        ELSE
        ld a,(PLY_AKM_DefaultStartWaitInTracks)
        ENDIF
        ld (PLY_AKM_Track1_EscapeWait),a
        ld (PLY_AKM_Track2_EscapeWait),a
        ld (PLY_AKM_Track3_EscapeWait),a

        ;Reads the state byte of the pattern.
        ld b,(hl)
        inc hl
        rr b             ;Speed change or end of song?
        jr nc,PLY_AKM_LinkerAfterSpeedChange
        ;Next byte is either the speed (>0) or an end of song marker.
        ld a,(hl)
        inc hl
                        ;If no speed used, it means "end of song" every time.
                        IFDEF PLY_CFG_UseSpeedTracks            ;CONFIG SPECIFIC        
        or a            ;0 if end of song, else speed.
        jr nz,PLY_AKM_LinkerSpeedChange
                        ENDIF ;PLY_CFG_UseSpeedTracks
        ;End of song.
        ld a,(hl)       ;Reads where to loop in the Linker.
        inc hl
        ld h,(hl)
        ld l,a
        jr PLY_AKM_LinkerPostPt
                        IFDEF PLY_CFG_UseSpeedTracks            ;CONFIG SPECIFIC        
PLY_AKM_LinkerSpeedChange:
        ;Speed change.
        ld (PLY_AKM_Speed + PLY_AKM_Offset1b),a
                        ENDIF ;PLY_CFG_UseSpeedTracks
PLY_AKM_LinkerAfterSpeedChange:

        ;New height?
        rr b
        jr nc,PLY_AKM_LinkerUsePreviousHeight
        ld a,(hl)
        inc hl
        ld (PLY_AKM_LinkerPreviousRemainingHeight + PLY_AKM_Offset1b),a
        jr PLY_AKM_LinkerSetRemainingHeight
        ;The same height is used. It was stored before.
PLY_AKM_LinkerUsePreviousHeight:
        IFNDEF PLY_AKM_Rom
PLY_AKM_LinkerPreviousRemainingHeight: ld a,0
        ELSE
        ld a,(PLY_AKM_LinkerPreviousRemainingHeight)
        ENDIF
PLY_AKM_LinkerSetRemainingHeight:
        ld (PLY_AKM_PatternRemainingHeight + PLY_AKM_Offset1b),a

        ;New Transposition and Track for channel 1?
        ld ix,PLY_AKM_Track1_Data
        call PLY_AKM_CheckTranspositionAndTrack
        ;New Transposition and Track for channel 2?
        ld ix,PLY_AKM_Track2_Data
        call PLY_AKM_CheckTranspositionAndTrack
        ;New Transposition and Track for channel 3?
        ld ix,PLY_AKM_Track3_Data
        call PLY_AKM_CheckTranspositionAndTrack
        
        ld (PLY_AKM_PtLinker + PLY_AKM_Offset1b),hl


;Reads the Tracks.
;---------------------------------
PLY_AKM_ReadLine:
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtInstruments: ld de,0
dknr3 (void):
PLY_AKM_NoteIndexTable: ld bc,0
        ELSE
        ld de,(PLY_AKM_PtInstruments)
        ld bc,(PLY_AKM_NoteIndexTable)
        ENDIF
        exx
                ld ix,PLY_AKM_Track1_Data
                call PLY_AKM_ReadTrack
                ld ix,PLY_AKM_Track2_Data
                call PLY_AKM_ReadTrack
                ld ix,PLY_AKM_Track3_Data
                call PLY_AKM_ReadTrack

                xor a
PLY_AKM_TickCounterManaged:
                ld (PLY_AKM_TickCounter + PLY_AKM_Offset1b),a



;Plays the sound stream.
;---------------------------------
                ld de,PLY_AKM_PeriodTable
        exx

        ld c,%11100000          ;Register 7, shifted of 2 to the left. Bits 2 and 5 will be possibly changed by each iteration.

        ld ix,PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track1_Registers
        call PLY_AKM_PlaySoundStream

        srl c                   ;Not RR, because we have to make sure the b6 is 0, else no more keyboard (on CPC)!
                                ;Also, on MSX, bit 6 must be 0.
        ld ix,PLY_AKM_Track2_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track2_Registers
        call PLY_AKM_PlaySoundStream

        IFDEF PLY_AKM_HARDWARE_MSX
                scf             ;On MSX, bit 7 must be 1.
                rr c
        ELSE
                rr c            ;On other platforms, we don't care about b7.
        ENDIF
        ld ix,PLY_AKM_Track3_Data
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        call PLY_AKM_ManageEffects
                        ENDIF ;PLY_CFG_UseEffects
        ld iy,PLY_AKM_Track3_Registers
        call PLY_AKM_PlaySoundStream

        ld a,c

;Plays the sound effects, if desired.
;-------------------------------------------
        IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
                        call PLY_AKM_PlaySoundEffectsStream
        ELSE
                        ld (PLY_AKM_MixerRegister),a
        ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS



;Sends the values to the PSG.
;---------------------------------
PLY_AKM_SendPsg:
        ld sp,PLY_AKM_Registers_RetTable

        IFDEF PLY_AKM_HARDWARE_CPC
dknr3 (void):  ld bc,#f680
        ld a,#c0
dknr3 (void):  ld de,#f4f6
        out (c),a	;#f6c0          ;Madram's trick requires to start with this. out (c),b works, but will activate K7's relay! Not clean.
        ENDIF

        IFDEF PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON
dknr3 (void):  ld de,#bfff
        ld c,#fd
        ENDIF

PLY_AKM_SendPsgRegister:
        pop hl          ;H = value, L = register.
PLY_AKM_SendPsgRegisterAfterPop:
        IFDEF PLY_AKM_HARDWARE_CPC
        ld b,d
        out (c),l       ;#f400 + register.
        ld b,e
        out (c),0       ;#f600
        ld b,d
        out (c),h       ;#f400 + value.
        ld b,e
        out (c),c       ;#f680
        out (c),a       ;#f6c0
        ENDIF

        IFDEF PLY_AKM_HARDWARE_SPECTRUM_OR_PENTAGON
        ld b,e
        out (c),l       ;#fffd + register.
        ld b,d
        out (c),h       ;#bffd + value
        ENDIF

        IFDEF PLY_AKM_HARDWARE_MSX
        ld a,l          ;Register.
        out (#a0),a
        ld a,h          ;Value.
        out (#a1),a
        ENDIF
        ret

                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
PLY_AKM_SendPsgRegisterR13:

        ;Should the R13 be played? Yes only if different. No "force retrig" is managed by this player.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SetReg13: ld a,0
PLY_AKM_SetReg13Old: cp 0
        ELSE
        ld a,(PLY_AKM_SetReg13Old)
        ld b,a
        ld a,(PLY_AKM_SetReg13)
        cp b
        ENDIF
        jr z,PLY_AKM_SendPsgRegisterEnd
        ;Different. R13 must be played. Updates the old R13 value.
        ld (PLY_AKM_SetReg13Old + PLY_AKM_Offset1b),a

        ld h,a
        ld l,13

        IFDEF PLY_AKM_HARDWARE_CPC
                ld a,#c0
        ENDIF

        ret                     ;Sends the 13th registers.
                        ENDIF ;PLY_CFG_UseHardwareSounds
PLY_AKM_SendPsgRegisterEnd:

        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_SaveSP: ld sp,0
        ELSE
        ld sp,(PLY_AKM_SaveSP)
        ENDIF
        ret





;Shifts B to the right, if carry, a transposition is read.
;Shifts B to the right once again, if carry, a new Track is read (may be an index or a track offset).
;IN:    HL = where to read the data.
;       IX = points on the track data buffer.
;       DE'= Track index table
;       B  = flags.
;OUT:   B  = shifted of two.
;       HL = increased according to read data.
PLY_AKM_CheckTranspositionAndTrack:
        ;New transposition?
        rr b
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        jr nc,PLY_AKM_CheckTranspositionAndTrack_AfterTransposition
        ;Transposition.
        ld a,(hl)
        ld (ix + PLY_AKM_Data_OffsetTransposition),a
        inc hl
PLY_AKM_CheckTranspositionAndTrack_AfterTransposition:
                        ENDIF ;PLY_CFG_UseTranspositions
        ;New Track?
        rr b
        jr nc,PLY_AKM_CheckTranspositionAndTrack_NoNewTrack
        ;New Track.
        ld a,(hl)
        inc hl
        ;Is it a reference?
        sla a
        jr nc,PLY_AKM_CheckTranspositionAndTrack_TrackOffset
        ;Reference.
        exx
                ld l,a          ;A is the track index * 2.
                ld h,0
                add hl,de       ;HL points on the track address.
                ld a,(hl)
                ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 0),a
                ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),a
                inc hl
                ld a,(hl)
                ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 1),a
                ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),a
        exx
        ret
PLY_AKM_CheckTranspositionAndTrack_TrackOffset:
        ;The Track is an offset. Counter the previous shift.
        rra             ;Carry was 0, so bit 7 is 0.
        ld d,a          ;D is the MSB of the offset.
        ld e,(hl)       ;Reads the LSB of the offset.
        inc hl
        
        ld c,l          ;Saves HL.
        ld a,h
        
        add hl,de       ;HL is now the Track (offset + $ (past offset));
        ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtStartTrack + 1),h
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        
        ld l,c          ;Retrieves HL.
        ld h,a
        ret
PLY_AKM_CheckTranspositionAndTrack_NoNewTrack:
        ;Copies the old Track inside the new Track pointer, as it evolves.
        ld a,(ix + PLY_AKM_Data_OffsetPtStartTrack + 0)
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),a
        ld a,(ix + PLY_AKM_Data_OffsetPtStartTrack + 1)
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),a
        ret





;Reads a Track.
;IN:    IX = Data block of the Track.
;       DE'= Instrument table. Do not modify!
;       BC'= Note index table. Do not modify!
PLY_AKM_ReadTrack:
        ;Are there any empty lines to wait?
        ld a,(ix + PLY_AKM_Data_OffsetWaitEmptyCell)
        sub 1
        jr c,PLY_AKM_RT_NoEmptyCell
        ;Wait!
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        ret

PLY_AKM_RT_NoEmptyCell:
        ;Reads the Track pointer.
        ld l,(ix + PLY_AKM_Data_OffsetPtTrack + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtTrack + 1)
PLY_AKM_RT_GetDataByte:
        ld b,(hl)
        inc hl
        ;First, reads the note/effect flag.
        IFDEF PLY_AKM_Rom
        ld a,(PLY_AKM_FlagNoteAndEffectInCell)
        ld c,a
        ENDIF
        ld a,b
        and %1111       ;Keeps only the note/data.
        IFNDEF PLY_AKM_Rom
PLY_AKM_FlagNoteAndEffectInCell: cp 12          ;0-12 = note reference if no effects in the song, or 0-11 if there are effects in the song.
        ELSE
        cp c
        ENDIF
        jr c,PLY_AKM_RT_NoteReference
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        sub 12                                  ;Can not be optimized with the code above, its value is automodified.
        jr z,PLY_AKM_RT_NoteAndEffects
        dec a
        jr z,PLY_AKM_RT_NoNoteMaybeEffects
                        ELSE
        sub 13
        jr z,PLY_AKM_RT_ReadWaitFlags          ;If no effects, directly check the wait flag.
                        ENDIF ;PLY_CFG_UseEffects
        dec a
        jr z,PLY_AKM_RT_NewEscapeNote
        ;15. Same escape note.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeNote)
        jr PLY_AKM_RT_AfterNoteRead
        
PLY_AKM_RT_NewEscapeNote:
        ;Reads the escape note, and stores it, it may be reused by other cells.
        ld a,(hl)
        ld (ix + PLY_AKM_Data_OffsetEscapeNote),a
        inc hl
        jr PLY_AKM_RT_AfterNoteRead

                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
PLY_AKM_RT_NoteAndEffects
        ;There is a "note and effects". This is a special case. A new data byte must be read, with the note and the normal flags.
        ;However, we use a "force effects" to mark the presence of effects.
        dec a     ;A is 0, give it any other value.
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        jr PLY_AKM_RT_GetDataByte
        
PLY_AKM_RT_NoNoteMaybeEffects
        ;Reads flag "instrument" to know what to do. The flags are diverted to indicate whether there are effects.
        bit 4,b     ;Effects?
        jr z,PLY_AKM_RT_ReadWaitFlags  ;No effects. As there is no note, logically, there are no instrument to read, so simply reads the Wait value.
        ld a,b          ;B is not 0, so it works.
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        jr PLY_AKM_RT_ReadWaitFlags
                        ENDIF ;PLY_CFG_UseEffects        
        
PLY_AKM_RT_NoteReference:
        ;A is the index of the note.
        exx
                ld l,a
                ld h,0
                add hl,bc
                ld a,(hl)
        exx

        ;A is the right note (0-127).
PLY_AKM_RT_AfterNoteRead:
        ;Adds the transposition.
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        add a,(ix + PLY_AKM_Data_OffsetTransposition)
                        ENDIF ;PLY_CFG_UseTranspositions
        ld (ix + PLY_AKM_Data_OffsetBaseNote),a

        ;Reads the instruments flags.
        ;------------------
        ld a,b
        and %110000
        jr z,PLY_AKM_RT_SameEscapeInstrument
        cp %010000
        jr z,PLY_AKM_RT_PrimaryInstrument
        cp %100000
        jr z,PLY_AKM_RT_SecondaryInstrument
        ;New escape instrument. Reads and stores it, it may be reused by other cells.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetEscapeInstrument),a
        jr PLY_AKM_RT_StoreCurrentInstrument

PLY_AKM_RT_SameEscapeInstrument:
        ;Use the latest escape instrument.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeInstrument)
        jr PLY_AKM_RT_StoreCurrentInstrument

PLY_AKM_RT_SecondaryInstrument:
        ;Use the secondary instrument.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SecondaryInstrument: ld a,0
        ELSE
        ld a,(PLY_AKM_SecondaryInstrument)
        ENDIF
        jr PLY_AKM_RT_StoreCurrentInstrument
        
PLY_AKM_RT_PrimaryInstrument:
        ;Use the primary instrument.
        IFNDEF PLY_AKM_Rom
PLY_AKM_PrimaryInstrument: ld a,0
        ELSE
        ld a,(PLY_AKM_PrimaryInstrument)
        ENDIF
        
PLY_AKM_RT_StoreCurrentInstrument:
        ;A is the instrument to play.
        exx
                ;Gets the address of the Instrument.
                add a,a         ;Only 127 instruments max.
                ld l,a
                ld h,0
                add hl,de       ;Adds to the Instrument Table.
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ;Reads the header of the Instrument.
                ld a,(hl)       ;Speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetInstrumentSpeed),a
                ;Stores the pointer on the data of the Instrument.
                ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        exx
        xor a
        ;Resets the step on the Instrument.
        ld (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep),a
        ;Resets the Track pitch.
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),a
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0),a
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1),a
        ;ld (ix + PLY_AKM_Data_OffsetTrackPitchDecimal),a               ;Shouldn't be needed, the difference shouldn't be noticeable.
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown

        ;Resets the offset on Arpeggio and Pitch tables.
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed)            ;The arpeggio speed must be reset.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a        
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetPitchOriginalSpeed)               ;The pitch speed must be reset.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
                        ENDIF ;PLY_CFG_UseEffect_PitchTable

        
        ;Reads the wait flags.
        ;----------------------
PLY_AKM_RT_ReadWaitFlags:
        ld a,b
        and %11000000
        jr z,PLY_AKM_RT_SameEscapeWait
        cp %01000000
        jr z,PLY_AKM_RT_PrimaryWait
        cp %10000000
        jr z,PLY_AKM_RT_SecondaryWait
        ;New escape wait. Reads and stores it, it may be reused by other cells.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetEscapeWait),a
        jr PLY_AKM_RT_StoreCurrentWait
                
PLY_AKM_RT_SameEscapeWait:
        ;Use the latest escape wait.
        ld a,(ix + PLY_AKM_Data_OffsetEscapeWait)
        jr PLY_AKM_RT_StoreCurrentWait
        
PLY_AKM_RT_PrimaryWait:
        ;Use the primary wait.
        IFNDEF PLY_AKM_Rom
PLY_AKM_PrimaryWait: ld a,0
        ELSE
        ld a,(PLY_AKM_PrimaryWait)
        ENDIF
        jr PLY_AKM_RT_StoreCurrentWait

PLY_AKM_RT_SecondaryWait:
        ;Use the secondary wait.
        IFNDEF PLY_AKM_Rom
PLY_AKM_SecondaryWait: ld a,0
        ELSE
        ld a,(PLY_AKM_SecondaryWait)
        ENDIF

PLY_AKM_RT_StoreCurrentWait:
        ;A is the wait to store.
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a

        ;--------------------
        ;Are there effects to read?
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
        IFNDEF PLY_AKM_Rom
PLY_AKM_RT_ReadEffectsFlag: ld a,0
        ELSE
        ld a,(PLY_AKM_RT_ReadEffectsFlag)
        ENDIF
        or a
        jr nz,PLY_AKM_RT_ReadEffects
PLY_AKM_RT_AfterEffects:
                        ENDIF ;PLY_CFG_UseEffects
        ;No effects, or after they have been managed.
        ;Saves the new pointer on the Track.
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        ret
                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
PLY_AKM_RT_ReadEffects:
        ;Resets the effect presence flag.
        xor a
        ld (PLY_AKM_RT_ReadEffectsFlag + PLY_AKM_Offset1b),a
        
PLY_AKM_RT_ReadEffect:
        ld iy,PLY_AKM_EffectTable
        ;Reads effect number and possible data. All effect must jump to PLY_AKM_RT_ReadEffect_Return when finished.
        ld b,(hl)
        ld a,b
        inc hl
        
        and %1110
        ld e,a
        ld d,0
        add iy,de
        
        ;As a convenience, puts the effect nibble "to the right", for direct use.
        ld a,b
        rra
        rra
        rra
        rra
        and %1111               ;This sets the carry flag, useful for the effects code.
        ;Executes the effect code.
        jp (iy)
PLY_AKM_RT_ReadEffect_Return:
        ;More effects?
        bit 0,b
        jr nz,PLY_AKM_RT_ReadEffect
        jr PLY_AKM_RT_AfterEffects

PLY_AKM_RT_WaitLong:
        ;A 8-bit byte is encoded just after.
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        jr PLY_AKM_RT_CellRead
PLY_AKM_RT_WaitShort:
        ;Only a 2-bit value is encoded.
        ld a,b
        rlca                     ;Transfers the bit 7/6 to 1/0. Thanks Hicks for the RCLA trick!
        rlca
        and %11
        ld (ix + PLY_AKM_Data_OffsetWaitEmptyCell),a
        ;jr PLY_AKM_RT_CellRead
;Jumped to after the Cell has been read.
;IN:    HL = new value of the Track pointer. Must point after the read Cell.
PLY_AKM_RT_CellRead:
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtTrack + 1),h
        ret


;Manages the effects, if any. For the activated effects, modifies the internal data for the Track which data block is given.
;IN:    IX = data block of the Track.
;OUT:   IX, IY = unmodified.
;       C must NOT be modified!
;       DE' must NOT be modified!
PLY_AKM_ManageEffects:
                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ;Pitch up/down used?
        ld a,(ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed)
        or a
        jr z,PLY_AKM_ME_PitchUpDownFinished

        ;Adds the LSB of integer part and decimal part, using one 16 bits operation.
        ld l,(ix + PLY_AKM_Data_OffsetTrackPitchDecimal)
        ld h,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0)

        ld e,(ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 0)
        ld d,(ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 1)

        ld a,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1)

        ;Negative pitch?
        bit 7,d
        jr nz,PLY_AKM_ME_PitchUpDown_NegativeSpeed

PLY_AKM_ME_PitchUpDown_PositiveSpeed:
        ;Positive speed. Adds it to the LSB of the integer part, and decimal part.
        add hl,de

        ;Carry? Transmits it to the MSB of the integer part.
        adc 0
        jr PLY_AKM_ME_PitchUpDown_Save
PLY_AKM_ME_PitchUpDown_NegativeSpeed:
        ;Negative speed. Resets the sign bit. The encoded pitch IS positive.
        ;Subtracts it to the LSB of the integer part, and decimal part.
        res 7,d

        or a
        sbc hl,de

        ;Carry? Transmits it to the MSB of the integer part.
        sbc 0

PLY_AKM_ME_PitchUpDown_Save:
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1),a

        ld (ix + PLY_AKM_Data_OffsetTrackPitchDecimal),l
        ld (ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0),h

PLY_AKM_ME_PitchUpDownFinished:
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown



        ;Manages the Arpeggio Table effect, if any.
        ;------------------------------------------
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed)
        or a
        jr z,PLY_AKM_ME_ArpeggioTableFinished

        ;Plays the arpeggio current note. It is suppose to be correct (not a loop).
        ;Plays it in any case, in order to manage some corner case with Force Arpeggio Speed.
        ld e,(ix + PLY_AKM_Data_OffsetPtArpeggioTable + 0)
        ld d,(ix + PLY_AKM_Data_OffsetPtArpeggioTable + 1)
        ld l,(ix + PLY_AKM_Data_OffsetPtArpeggioOffset)
        ld h,0
        add hl,de
        ld a,(hl)       ;Gets the Arpeggio value (b1-b7).
        sra a           ;Carry is 0, because the ADD above surely didn't overflow.
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a

        ;Moves forward, if the speed has been reached.
        ;Has the speed been reached?
        ld a,(ix + PLY_AKM_Data_OffsetArpeggioCurrentStep)
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        cp (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed)
                                ELSE
        cp (ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed)
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
        jr c,PLY_AKM_ME_ArpeggioTable_SpeedNotReached
        ;Resets the speed. Reads the next Arpeggio value.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),0
        
        ;Advances in the Arpeggio.
        inc (ix + PLY_AKM_Data_OffsetPtArpeggioOffset)
        inc hl          ;HL points on the next value. No need to add to the base offset like before, we have it.
        ld a,(hl)
        ;End of the Arpeggio?
        rra             ;Carry is 0.
        jr nc,PLY_AKM_ME_ArpeggioTableFinished
        ;End of the Arpeggio. The loop offset is now in A.
        ld l,a
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        jr PLY_AKM_ME_ArpeggioTableFinished
        
PLY_AKM_ME_ArpeggioTable_SpeedNotReached:
        inc a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a

PLY_AKM_ME_ArpeggioTableFinished:
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable



        ;Manages the Pitch Table effect, if any.
        ;------------------------------------------
                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld a,(ix + PLY_AKM_Data_OffsetIsPitchTableUsed)
        or a
        ret z

        ;Plays the Pitch Table current note. It is suppose to be correct (not a loop).
        ;Plays it in any case, in order to manage some corner case with Force Pitch Speed.
        ;Reads the Pitch Table. Adds the Pitch base address to an offset.
        ld l,(ix + PLY_AKM_Data_OffsetPtPitchTable + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtPitchTable + 1)
        ld e,(ix + PLY_AKM_Data_OffsetPtPitchOffset)
        ld d,0
        add hl,de
        ld a,(hl)       ;Gets the Pitch value (b1-b7).
        sra a
        ;A = pitch note. It is converted to 16 bits.
        ;D is already 0.
        jp p,PLY_AKM_ME_PitchTableEndNotReached_Positive
        dec d
PLY_AKM_ME_PitchTableEndNotReached_Positive:
        ld (ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 0),a
        ld (ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 1),d
        
        ;Moves forward, if the speed has been reached.
        ;Has the speed been reached?
        ld a,(ix + PLY_AKM_Data_OffsetPitchCurrentStep)
                        IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        cp (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed)
                        ELSE
        cp (ix + PLY_AKM_Data_OffsetPitchOriginalSpeed)
                        ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        jr c,PLY_AKM_ME_PitchTable_SpeedNotReached
        ;Resets the speed, then reads the next Pitch value.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),0
        
        ;Advances in the Pitch.
        inc (ix + PLY_AKM_Data_OffsetPtPitchOffset)
        inc hl          ;HL points on the next value. No need to add to the base offset like before, we have it.
        ld a,(hl)
        ;End of the Pitch?
        rra             ;Carry is 0.
        ret nc
        ;End of the Pitch. The loop offset is now in A.
        ld l,a
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ret

PLY_AKM_ME_PitchTable_SpeedNotReached:
        inc a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
        ret
                        ENDIF ;PLY_CFG_UseEffects
        
        


;---------------------------------------------------------------------
;Sound stream.
;---------------------------------------------------------------------

;Plays the sound stream, filling the PSG registers table (but not playing it).
;The Instrument pointer must be updated as it evolves inside the Instrument.
;IN:    IX = Data block of the Track.
;       IY = Points at the beginning of the register structure related to the channel.
;       C = R7. Only bit 2 (sound) must be *set* to cut the sound if needed, and bit 5 (noise) must be *reset* if there is noise.
;       DE' = Period table. Must not be modified.
PLY_AKM_PlaySoundStream:
        ;Gets the pointer on the Instrument, from its base address and the offset.
        ld l,(ix + PLY_AKM_Data_OffsetPtInstrument + 0)
        ld h,(ix + PLY_AKM_Data_OffsetPtInstrument + 1)

        ;Reads the first byte of the cell of the Instrument. What type?
PLY_AKM_PSS_ReadFirstByte:
        ld a,(hl)
        ld b,a
        inc hl
        rra
        jr c,PLY_AKM_PSS_SoftOrSoftAndHard

        ;NoSoftNoHard or SoftwareToHardware
        rra
                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
        jr c,PLY_AKM_PSS_SoftwareToHardware
                        ENDIF ;PLY_CFG_UseHardwareSounds

        ;No software no hardware, or end of sound (loop)!
        ;End of sound?
        rra
        jr nc,PLY_AKM_PSS_NSNH_NotEndOfSound
        ;The sound loops/ends. Where?
        ld a,(hl)
        inc hl
        ld h,(hl)
        ld l,a
        ;As a sound always has at least one cell, we should safely be able to read its bytes without storing the instrument pointer.
        ;However, we do it anyway to remove the overhead of the Speed management: if looping, the same last line will be read,
        ;if several channels do so, it will be costly. So...
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        jr PLY_AKM_PSS_ReadFirstByte

PLY_AKM_PSS_NSNH_NotEndOfSound:
        ;No software, no hardware.
        ;-------------------------
        ;Stops the sound.
        set 2,c

        ;Volume. A now contains the volume on b0-3.
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        call PLY_AKM_PSS_Shared_AdjustVolume
                        ELSE
        and %1111
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        ld (iy + PLY_AKM_Registers_OffsetVolume),a

        ;Read noise?
        rl b
                        IFDEF PLY_CFG_NoSoftNoHard_Noise        ;CONFIG SPECIFIC
        call c,PLY_AKM_PSS_ReadNoise
                        ENDIF ;PLY_CFG_NoSoftNoHard_Noise
        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer

        ;Software sound, or Software and Hardware?
PLY_AKM_PSS_SoftOrSoftAndHard:
        rra
                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
        jr c,PLY_AKM_PSS_SoftAndHard
                        ENDIF ;PLY_CFG_UseHardwareSounds

        ;Software sound.
        ;-----------------
        ;A is the volume. Already shifted twice, so it can be used directly.
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        call PLY_AKM_PSS_Shared_AdjustVolume
                        ELSE
        and %1111
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        ld (iy + PLY_AKM_Registers_OffsetVolume),a

        ;Arp and/or noise?
        ld d,0          ;Default arpeggio.
        rl b
        jr nc,PLY_AKM_PSS_S_AfterArpAndOrNoise
        ld a,(hl)
        inc hl
        ;Noise?
        sra a
        ;A is now the signed Arpeggio. It must be kept.
        ld d,a
        ;Now takes care of the noise, if there is a Carry.
                        IFDEF PLY_CFG_SoftOnly_Noise          ;CONFIG SPECIFIC
        call c,PLY_AKM_PSS_ReadNoise
                        ENDIF ;PLY_CFG_SoftOnly_Noise
PLY_AKM_PSS_S_AfterArpAndOrNoise:

        ld a,d          ;Gets the instrument arpeggio, if any.
        call PLY_AKM_CalculatePeriodForBaseNote

        ;Read pitch?
        rl b
                        IFDEF PLY_CFG_SoftOnly_SoftwarePitch    ;CONFIG SPECIFIC
        call c,PLY_AKM_ReadPitchAndAddToPeriod
                        ENDIF ;PLY_CFG_SoftOnly_SoftwarePitch

        ;Stores the new period of this channel.
        exx
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodLSB),l
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodMSB),h
        exx

        ;The code below is shared!
        ;Stores the new instrument pointer, if Speed allows it.
        ;--------------------------------------------------
PLY_AKM_PSS_Shared_StoreInstrumentPointer:
        ;Checks the Instrument speed, and only stores the Instrument new pointer if the speed is reached.
        ld a,(ix + PLY_AKM_Data_OffsetInstrumentCurrentStep)
        cp (ix + PLY_AKM_Data_OffsetInstrumentSpeed)
        jr nc,PLY_AKM_PSS_S_SpeedReached
        ;Increases the current step.
        inc (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep)
        ret
PLY_AKM_PSS_S_SpeedReached:
        ;Stores the Instrument new pointer, resets the speed counter.
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 0),l
        ld (ix + PLY_AKM_Data_OffsetPtInstrument + 1),h
        ld (ix + PLY_AKM_Data_OffsetInstrumentCurrentStep),0
        ret


                        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC

        ;Software and Hardware.
        ;----------------------------
PLY_AKM_PSS_SoftAndHard:
        ;Reads the envelope bit, the possible pitch, and sets the software period accordingly.
        call PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv
        ;Reads the hardware period.
        ld a,(hl)
        ld (PLY_AKM_Reg11),a
        inc hl
        ld a,(hl)
        ld (PLY_AKM_Reg12),a
        inc hl

        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer


        ;Software to Hardware.
        ;-------------------------
PLY_AKM_PSS_SoftwareToHardware:
        call PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv

        ;Now we can calculate the hardware period thanks to the ratio (contray to LW, it is NOT inverted, we can use it as-is).
        ld a,b
        rlca
        rlca
        rlca
        rlca
        and %111
        exx
                jr z,PLY_AKM_PSS_STH_RatioEnd
PLY_AKM_PSS_STH_RatioLoop:
                srl h
                rr l
                dec a 
                jr nz,PLY_AKM_PSS_STH_RatioLoop
                ;If carry, rounds the period.
                jr nc,PLY_AKM_PSS_STH_RatioEnd
                inc hl
PLY_AKM_PSS_STH_RatioEnd:
                ld a,l
                ld (PLY_AKM_Reg11),a
                ld a,h
                ld (PLY_AKM_Reg12),a
        exx

        jr PLY_AKM_PSS_Shared_StoreInstrumentPointer

;A shared code for hardware sound.
;Reads the envelope bit in bit 1, arpeggio in bit 7 pitch in bit 2 from A. If pitch present, adds it to BC'.
;Converts the note to period, adds the instrument pitch, sets the software period of the channel.
;Also sets the hardware volume, and sets the hardware curve.
PLY_AKM_PSS_Shared_ReadEnvBitPitchArp_SoftPeriod_HardVol_HardEnv:
        ;Envelope bit? R13 = 8 + 2 * (envelope bit?). Allows to have hardware envelope to 8 or 0xa.
        ;Shifted by 2 to the right, bit 1 is now envelope bit, which is perfect for us.
        and %10
        add a,8
        ld (PLY_AKM_SetReg13 + PLY_AKM_Offset1b),a

        ;Volume to 16 to trigger the hardware envelope.
        ld (iy + PLY_AKM_Registers_OffsetVolume),16

        ;Arpeggio?
        xor a                   ;Default arpeggio.
                        IFDEF PLY_AKM_ArpeggioInHardwareInstrument  ;CONFIG SPECIFIC
        bit 7,b                 ;Not shifted yet.
        jr z,PLY_AKM_PSS_Shared_REnvBAP_AfterArpeggio
        ;Reads the Arpeggio.
        ld a,(hl)
        inc hl
PLY_AKM_PSS_Shared_REnvBAP_AfterArpeggio:
                        ENDIF ;PLY_AKM_ArpeggioInHardwareInstrument
        ;Calculates the software period.
        call PLY_AKM_CalculatePeriodForBaseNote

        ;Pitch?
                        IFDEF PLY_AKM_PitchInHardwareInstrument  ;CONFIG SPECIFIC
        bit 2,b         ;Not shifted yet.
        call nz,PLY_AKM_ReadPitchAndAddToPeriod
                        ENDIF ;PLY_AKM_PitchInHardwareInstrument

        ;Stores the new period of this channel.
        exx
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodLSB),l
                ld (iy + PLY_AKM_Registers_OffsetSoftwarePeriodMSB),h
        exx
        ret

                        ENDIF ;PLY_CFG_UseHardwareSounds

                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
;Decreases the given volume (encoded in possibly more then 4 bits). If <0, forced to 0.
;IN:    A = volume, not ANDed.
;OUT:   A = new volume.
PLY_AKM_PSS_Shared_AdjustVolume:
        and %1111
        sub (ix + PLY_AKM_Data_OffsetTrackInvertedVolume)
        ret nc
        xor a
        ret
                        ENDIF ;PLY_CFG_UseEffect_SetVolume

;Reads and stores the noise pointed by HL, opens the noise channel.
;IN:    HL = instrument data where the noise is.
;OUT:   HL = HL++.
;MOD:   A.
                IFDEF PLY_AKM_USE_Noise          ;CONFIG SPECIFIC
PLY_AKM_PSS_ReadNoise:
        ld a,(hl)
        inc hl
        ld (PLY_AKM_NoiseRegister),a
        res 5,c                 ;Opens the noise channel.
        ret
                ENDIF ;PLY_AKM_USE_Noise
                
;Calculates the period according to the base note and put it in BC'. Used by both software and hardware codes.
;IN:    DE' = period table.
;       A = instrument arpeggio (0 if not used).
;OUT:   HL' = period.
;MOD:   A
PLY_AKM_CalculatePeriodForBaseNote:
        ;Gets the period from the current note.
        exx
                ld h,0
                add a,(ix + PLY_AKM_Data_OffsetBaseNote)                         ;Adds the instrument Arp to the base note (including the transposition).
                                IFDEF PLY_CFG_UseEffect_ArpeggioTable            ;CONFIG SPECIFIC
                add (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue)               ;Adds the Arpeggio Table effect.
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                ;Finds the period from a single line of octave look-up table. This is slow...
                ;IN:    DE = PeriodTable.
                ;       A = note (>=0).
                ;OUT:   HL = period.
                ;       DE unmodified.
                ;       BC modified.

                ;Finds the octave.
dknr3 (void):   ld bc,255 * 256 + 12            ;B = Octave (>=0). Will be increased just below.
PLY_AKM_FindOctave_Loop:
                inc b           ;Next octave.
                sub c
                jr nc,PLY_AKM_FindOctave_Loop
                add a,c         ;Compensates the first iteration that may not have been useful.
        
                ;A = note inside the octave. Gets the period for the note, for the lowest octave.
                add a,a
                ld l,a
                ld h,0
                add hl,de       ;Points on the period on the lowest octave.
                ld a,(hl)
                inc hl
                ld h,(hl)       ;HL is the period on the lowest octave.
                ld l,a
                ;Divides the period as long as we haven't reached the octave.
                ld a,b
                or a
                jr z,PLY_AKM_FindOctave_OctaveShiftLoop_Finished
PLY_AKM_FindOctave_OctaveShiftLoop:
                srl h
                rr l
                djnz PLY_AKM_FindOctave_OctaveShiftLoop          ;Fortunately, does not modify the carry, used below.
PLY_AKM_FindOctave_OctaveShiftLoop_Finished:
                ;Rounds the period at the last iteration.
                jr nc,PLY_AKM_FindOctave_Finished
                inc hl
PLY_AKM_FindOctave_Finished:

                ;Adds the Pitch Table value, if used.
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
                ld a,(ix + PLY_AKM_Data_OffsetIsPitchTableUsed)
                or a
                jr z,PLY_AKM_CalculatePeriodForBaseNote_NoPitchTable
                ld c,(ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 0)
                ld b,(ix + PLY_AKM_Data_OffsetCurrentPitchTableValue + 1)
                add hl,bc
PLY_AKM_CalculatePeriodForBaseNote_NoPitchTable:
                        ENDIF ;PLY_CFG_UseEffect_PitchTable
                ;Adds the Track Pitch.
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
                ld c,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 0)
                ld b,(ix + PLY_AKM_Data_OffsetTrackPitchInteger + 1)
                add hl,bc
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
        exx
        ret

                        IFDEF PLY_AKM_PitchInInstrument  ;CONFIG SPECIFIC
;Reads the pitch in the Instruments (16 bits) and adds it to HL', which should contain the software period.
;IN:    HL = points on the pitch value.
;OUT:   HL = points after the pitch.
;MOD:   A, BC', HL' updated.
PLY_AKM_ReadPitchAndAddToPeriod:
        ;Reads 2 * 8 bits for the pitch. Slow...
        ld a,(hl)
        inc hl
        exx
                ld c,a                  ;Adds the read pitch to the note period.
        exx
        ld a,(hl)
        inc hl
        exx
                ld b,a
                add hl,bc
        exx
        ret
                        ENDIF ;PLY_AKM_PitchInInstrument







;---------------------------------------------------------------------
;Effect management.
;---------------------------------------------------------------------

                        IFDEF PLY_CFG_UseEffects        ;CONFIG SPECIFIC
                        
;IN:    HL = points after the first byte.
;       A = data of the first byte on bits 0-3, the other bits are 0.
;       Carry = 0.
;       Z flag = 1 if the data is 0.
;       DE'= Instrument Table (not useful here). Do not modify!
;       IX = data block of the Track.
;       B = Do not modify!
;OUT:   HL = points after the data of the effect (maybe nothing to do).
;       Each effect must jump to PLY_AKM_RT_ReadEffect_Return.

                                IFDEF PLY_CFG_UseEffect_Reset           ;CONFIG SPECIFIC.
;Clears all the effects (volume, pitch table, arpeggio table).
PLY_AKM_EffectResetWithVolume:
        ;Inverted volume.
                                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetTrackInvertedVolume),a
                                        ENDIF ;PLY_CFG_UseEffect_SetVolume
        xor a
        ;The inverted volume is managed above, so don't change it.
                                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),a
                                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed),a
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a      ;Contrary to the Pitch, the value must be reset.
                                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        ld (ix + PLY_AKM_Data_OffsetIsPitchTableUsed),a
                                        ENDIF ;PLY_CFG_UseEffect_PitchTable
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_Reset


;Changes the volume.
                                IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
PLY_AKM_EffectVolume:
        ld (ix + PLY_AKM_Data_OffsetTrackInvertedVolume),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_SetVolume

                                IFDEF PLY_CFG_UseEffect_ForceInstrumentSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Instrument. The current step is NOT changed.
PLY_AKM_EffectForceInstrumentSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetInstrumentSpeed),a
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForceInstrumentSpeed

                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Pitch. The current step is NOT changed.
PLY_AKM_EffectForcePitchSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
        ;ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a                ;No need to force next note of the Arpeggio. Faster, and more compliant with the C++ player.
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
;Forces the speed of the Arpeggio. The current step is NOT changed.
PLY_AKM_EffectForceArpeggioSpeed:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
        ;ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a             ;No need to force next note of the Arpeggio. Faster, and more compliant with the C++ player.
        
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed


;Effect table. Each entry jumps to an effect management code.
;Put after the code above so that the JR are within bound.
PLY_AKM_EffectTable:
                                IFDEF PLY_CFG_UseEffect_Reset           ;CONFIG SPECIFIC.
        jr PLY_AKM_EffectResetWithVolume                         ;000
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_Reset
                                
                                IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectVolume                                  ;001
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_SetVolume
        
                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectPitchUpDown                             ;010
                                ELSE
                                jr $
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown

                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectArpeggioTable                           ;011
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                               
                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectPitchTable                              ;100
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_PitchTable
        
                                IFDEF PLY_CFG_UseEffect_ForceInstrumentSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForceInstrumentSpeed                    ;101
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ForceInstrumentSpeed
        
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForceArpeggioSpeed                      ;110
                                ELSE
                                jr $
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                   
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        jr PLY_AKM_EffectForcePitchSpeed                         ;111
                                ELSE
                                ;jr $   ;Last one. No need to encode it.
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed             


                                IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
;Pitch up/down effect, activation or stop.
PLY_AKM_EffectPitchUpDown:
        rra     ;Pitch present or pitch stop?
        jr nc,PLY_AKM_EffectPitchUpDown_Deactivated
        ;Activates the effect.
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),255
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 0),a
        ld a,(hl)
        inc hl
        ld (ix + PLY_AKM_Data_OffsetTrackPitchSpeed + 1),a
        jp PLY_AKM_RT_ReadEffect_Return
PLY_AKM_EffectPitchUpDown_Deactivated:
        ;Pitch stop.
        ld (ix + PLY_AKM_Data_OffsetIsPitchUpDownUsed),0
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        

                                IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
;Arpeggio table effect, activation or stop.
PLY_AKM_EffectArpeggioTable:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetIsArpeggioTableUsed),a       ;Sets to 0 if the Arpeggio is stopped, or any other value if it starts.
        or a
        jr z,PLY_AKM_EffectArpeggioTable_Stop

        ;Gets the Arpeggio address.
        add a,a
        exx
                ld l,a
                ld h,0
        ;BC is modified, will be restored below.
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtArpeggios: ld bc,0            ;Arpeggio table does not encode entry 0, but the pointer points two bytes earlier to compensate.
        ELSE
        ld bc,(PLY_AKM_PtArpeggios)
        ENDIF
                add hl,bc
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ld a,(hl)               ;Reads the speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetArpeggioOriginalSpeed),a
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
                ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
                ld (ix + PLY_AKM_Data_OffsetPtArpeggioTable + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtArpeggioTable + 1),h
                
                ld bc,(PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b)
        exx

        ;Resets the offset of the Arpeggio to restart the Arpeggio, and forces a step to read immediately.
        xor a
        ld (ix + PLY_AKM_Data_OffsetPtArpeggioOffset),a
        ld (ix + PLY_AKM_Data_OffsetArpeggioCurrentStep),a
        jp PLY_AKM_RT_ReadEffect_Return
PLY_AKM_EffectArpeggioTable_Stop:
        ;Contrary to the Pitch, the Arpeggio must also be set to 0 when stopped.
        ld (ix + PLY_AKM_Data_OffsetCurrentArpeggioValue),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_ArpeggioTable

                                IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
;Pitch table effect, activation or stop.
;This is almost exactly the same code as for the Arpeggio, but I can't find a way to share it...
PLY_AKM_EffectPitchTable:
        call PLY_AKM_EffectReadIfEscape         ;Makes sure the data is 0-14, else 15 means: read the next escape value.
        ld (ix + PLY_AKM_Data_OffsetIsPitchTableUsed),a  ;Sets to 0 if the Pitch is stopped, or any other value if it starts.
        or a
        jp z,PLY_AKM_RT_ReadEffect_Return
        
        ;Gets the Pitch address.
        add a,a
        exx
                ld l,a
                ld h,0
        ;BC is modified, will be restored below.
        IFNDEF PLY_AKM_Rom
dknr3 (void):
PLY_AKM_PtPitches: ld bc,0            ;Pitch table does not encode entry 0, but the pointer points two bytes earlier to compensate.
        ELSE
        ld bc,(PLY_AKM_PtPitches)
        ENDIF
                add hl,bc
                ld a,(hl)
                inc hl
                ld h,(hl)
                ld l,a
                ld a,(hl)               ;Reads the speed.
                inc hl
                ld (ix + PLY_AKM_Data_OffsetPitchOriginalSpeed),a
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
                ld (ix + PLY_AKM_Data_OffsetPitchCurrentSpeed),a
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
                ld (ix + PLY_AKM_Data_OffsetPtPitchTable + 0),l
                ld (ix + PLY_AKM_Data_OffsetPtPitchTable + 1),h
                
                ld bc,(PLY_AKM_NoteIndexTable + PLY_AKM_Offset1b)
        exx

        ;Resets the offset of the Pitch to restart the Pitch, and forces a step to read immediately.
        xor a
        ld (ix + PLY_AKM_Data_OffsetPtPitchOffset),a
        ld (ix + PLY_AKM_Data_OffsetPitchCurrentStep),a
        jp PLY_AKM_RT_ReadEffect_Return
                                ENDIF ;PLY_CFG_UseEffect_PitchTable





        
;Reads the next escape byte if A is 15, else returns A (0-14).
;IN:    HL= data in the effect
;       A = 0-15. bit 7-4 must be 0.
;OUT:   HL= may be increased if an escape value is read.
;       A = the 8-bit value.
PLY_AKM_EffectReadIfEscape:
        cp 15
        ret c
        ;Reads the escape value.
        ld a,(hl)
        inc hl
        ret

                        ENDIF ;PLY_CFG_UseEffects
                        
                        
;---------------------------------------------------------------------
;Data blocks for the three channels. Make sure NOTHING is added between, as the init clears everything!
;---------------------------------------------------------------------

        counter = 0
        ;Macro to declare a DB if RAM player, or an increasing EQU for ROM player.
        MACRO PLY_AKM_db label
                IFNDEF PLY_AKM_Rom
                        dkbs (void)
                        {label} db 0
                        dkbe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 1
                ENDIF
        ENDM
        
        ;Macro to declare a DW if RAM player, or an increasing (of two bytes) EQU for ROM player.
        MACRO PLY_AKM_dw label
                IFNDEF PLY_AKM_Rom
                        dkws (void)
                        {label} dw 0
                        dkwe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 2
                ENDIF
        ENDM
        

        ;Specific generic data for ROM (non-related to channels).
        ;Important: must be declared BEFORE the channel-specific data.
        IFDEF PLY_AKM_Rom
        PLY_AKM_dw PLY_AKM_PtInstruments
        PLY_AKM_dw PLY_AKM_PtArpeggios
        PLY_AKM_dw PLY_AKM_PtPitches
        PLY_AKM_dw PLY_AKM_PtLinker
        PLY_AKM_dw PLY_AKM_NoteIndexTable
        PLY_AKM_dw PLY_AKM_TrackIndex
        PLY_AKM_dw PLY_AKM_SaveSP
        
        PLY_AKM_db PLY_AKM_DefaultStartNoteInTracks
        PLY_AKM_db PLY_AKM_DefaultStartInstrumentInTracks
        PLY_AKM_db PLY_AKM_DefaultStartWaitInTracks
        PLY_AKM_db PLY_AKM_PrimaryInstrument
        PLY_AKM_db PLY_AKM_SecondaryInstrument
        PLY_AKM_db PLY_AKM_PrimaryWait
        PLY_AKM_db PLY_AKM_SecondaryWait
        PLY_AKM_db PLY_AKM_FlagNoteAndEffectInCell
        
        PLY_AKM_db PLY_AKM_PatternRemainingHeight
        PLY_AKM_db PLY_AKM_LinkerPreviousRemainingHeight
        PLY_AKM_db PLY_AKM_Speed
        PLY_AKM_db PLY_AKM_TickCounter
        PLY_AKM_db PLY_AKM_SetReg13Old
        PLY_AKM_db PLY_AKM_SetReg13
        PLY_AKM_db PLY_AKM_RT_ReadEffectsFlag
        
        ;RET table: db register, db value, dw code to jump to once the value is read.
        ;MUST be consistent with the RAM buffer!
PLY_AKM_Registers_RetTable: equ PLY_AKM_ROM_Buffer + counter
        ;Reg 8.
        PLY_AKM_db PLY_AKM_Track1_Registers
        PLY_AKM_db PLY_AKM_Track1_Volume
        PLY_AKM_dw PLY_AKM_Track1_VolumeRet
        ;Reg 0.
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track1_SoftwarePeriodLSBRet
        ;Reg 1.
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track1_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track1_SoftwarePeriodMSBRet
        
        ;Reg 9.
        PLY_AKM_db PLY_AKM_Track2_Registers
        PLY_AKM_db PLY_AKM_Track2_Volume
        PLY_AKM_dw PLY_AKM_Track2_VolumeRet
        ;Reg 2.
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track2_SoftwarePeriodLSBRet
        ;Reg 3.
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track2_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track2_SoftwarePeriodMSBRet
        
        ;Reg 10.
        PLY_AKM_db PLY_AKM_Track3_Registers
        PLY_AKM_db PLY_AKM_Track3_Volume
        PLY_AKM_dw PLY_AKM_Track3_VolumeRet
        ;Reg 4.
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodLSBRegister
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodLSB
        PLY_AKM_dw PLY_AKM_Track3_SoftwarePeriodLSBRet
        ;Reg 5.
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodMSBRegister
        PLY_AKM_db PLY_AKM_Track3_SoftwarePeriodMSB
        PLY_AKM_dw PLY_AKM_Track3_SoftwarePeriodMSBRet
        
        IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
                ;Reg 6.
                PLY_AKM_db PLY_AKM_NoiseRegisterPlaceholder
                PLY_AKM_db PLY_AKM_NoiseRegister        ;Misnomer: this is the value.
                PLY_AKM_dw PLY_AKM_NoiseRegisterRet
        ENDIF
        
        ;Reg 7.
        PLY_AKM_db PLY_AKM_MixerRegisterPlaceholder
        PLY_AKM_db PLY_AKM_MixerRegister        ;Misnomer: this is the value.
        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
                PLY_AKM_dw PLY_AKM_MixerRegisterRet
                ;Reg 11.
                PLY_AKM_db PLY_AKM_Reg11Register
                PLY_AKM_db PLY_AKM_Reg11
                PLY_AKM_dw PLY_AKM_Reg11Ret
                ;Reg 12.
                PLY_AKM_db PLY_AKM_Reg12Register
                PLY_AKM_db PLY_AKM_Reg12
                PLY_AKM_dw PLY_AKM_Reg12Ret
                ;This one is a trick to send the register after R13 is managed.
                PLY_AKM_dw PLY_AKM_Reg12Ret2
        ENDIF
        
        PLY_AKM_dw PLY_AKM_RegsFinalRet
        
        
        ;The buffers for sound effects (if any), for each channel. They are treated apart, because they must be consecutive.
                IFDEF PLY_AKM_MANAGE_SOUND_EFFECTS
PLY_AKM_dw PLY_AKM_PtSoundEffectTable
                        REPEAT 3, channelNumber
PLY_AKM_dw PLY_AKM_Channel{channelNumber}_SoundEffectData
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectInvertedVolume
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectCurrentStep
PLY_AKM_db PLY_AKM_Channel{channelNumber}_SoundEffectSpeed
                if channelNumber != 3
                        counter = counter + 3 ;Padding of 3, but only necessary for channel 1 and 2.
                endif
                        REND
                ENDIF ;PLY_AKM_MANAGE_SOUND_EFFECTS
        
        
        ENDIF ;PLY_AKM_Rom
        
;Data block for channel 1.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track1_Data:
        ELSE
                counterStartInTrackData = counter                    ;Duplicates the counter value to determine later the size of the track buffer.
        ENDIF
        PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      ;How many empty cells have to be waited. 0 = none.
        IFDEF PLY_AKM_Rom
                PLY_AKM_Track1_Data equ PLY_AKM_Track1_WaitEmptyCell
        ENDIF
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_Transposition
                        ENDIF ;PLY_CFG_UseTranspositions
        PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       ;Points at the start of the Track to read. Does not change, unless the Track changes.
        PLY_AKM_dw PLY_AKM_Track1_PtTrack                            ;Points on the next Cell of the Track to read. Evolves.
        PLY_AKM_db PLY_AKM_Track1_BaseNote                           ;Base note, such as the note played. The transposition IS included.
        PLY_AKM_db PLY_AKM_Track1_EscapeNote                         ;The escape note. The transposition is NOT included.
        PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   ;The escape instrument.
        PLY_AKM_db PLY_AKM_Track1_EscapeWait                         ;The escape wait.
        PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       ;Points on the Instrument, evolves.
        PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              ;The current step on the Instrument (>=0, till it reaches the Speed).
        PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    ;The Instrument speed (>=0).
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_TrackInvertedVolume
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsPitchUpDownUsed                  ;>0 if a Pitch Up/Down is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_TrackPitchInteger                   ;The integer part of the Track pitch. Evolves as the pitch goes up/down.
        PLY_AKM_db PLY_AKM_Track1_TrackPitchDecimal                   ;The decimal part of the Track pitch. Evolves as the pitch goes up/down.
        PLY_AKM_dw PLY_AKM_Track1_TrackPitchSpeed                     ;The integer and decimal part of the Track pitch speed. Is added to the Track Pitch every frame.
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsArpeggioTableUsed                 ;>0 if an Arpeggio Table is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_PtArpeggioTable                     ;Point on the base of the Arpeggio table, does not evolve.
        PLY_AKM_db PLY_AKM_Track1_PtArpeggioOffset                    ;Increases over the Arpeggio.
        PLY_AKM_db PLY_AKM_Track1_ArpeggioCurrentStep                 ;The arpeggio current step (>=0, increases).
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_ArpeggioCurrentSpeed                ;The arpeggio speed (>=0, may be changed by the Force Arpeggio Speed effect).
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
        PLY_AKM_db PLY_AKM_Track1_ArpeggioOriginalSpeed               ;The arpeggio original speed (>=0, NEVER changes for this arpeggio).
        PLY_AKM_db PLY_AKM_Track1_CurrentArpeggioValue                ;Value from the Arpeggio to add to the base note. Read even if the Arpeggio effect is deactivated.
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_IsPitchTableUsed                    ;>0 if a Pitch Table is currently in use.
        PLY_AKM_dw PLY_AKM_Track1_PtPitchTable                        ;Points on the base of the Pitch table, does not evolve.
        PLY_AKM_db PLY_AKM_Track1_PtPitchOffset                       ;Increases over the Pitch.
        PLY_AKM_db PLY_AKM_Track1_PitchCurrentStep                    ;The Pitch current step (>=0, increases).
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
        PLY_AKM_db PLY_AKM_Track1_PitchCurrentSpeed                   ;The Pitch speed (>=0, may be changed by the Force Pitch Speed effect).
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
        PLY_AKM_db PLY_AKM_Track1_PitchOriginalSpeed                  ;The Pitch original speed (>=0, NEVER changes for this pitch).
        PLY_AKM_dw PLY_AKM_Track1_CurrentPitchTableValue              ;16 bit value from the Pitch to add to the base note. Not read if the Pitch effect is deactivated.

                        ENDIF ;PLY_CFG_UseEffect_PitchTable

        IFNDEF PLY_AKM_Rom
PLY_AKM_Track1_Data_End:
PLY_AKM_Track1_Data_Size: equ PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data
        ELSE
PLY_AKM_Track1_Data_Size = counter - counterStartInTrackData
PLY_AKM_Track1_Data_End = PLY_AKM_Track1_Data + PLY_AKM_Track1_Data_Size
        ENDIF

PLY_AKM_Data_OffsetWaitEmptyCell:                equ PLY_AKM_Track1_WaitEmptyCell - PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseTranspositions         ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetTransposition:                equ PLY_AKM_Track1_Transposition - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseTranspositions
PLY_AKM_Data_OffsetPtStartTrack:                 equ PLY_AKM_Track1_PtStartTrack - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtTrack:                      equ PLY_AKM_Track1_PtTrack - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetBaseNote:                     equ PLY_AKM_Track1_BaseNote - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeNote:                   equ PLY_AKM_Track1_EscapeNote - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeInstrument:             equ PLY_AKM_Track1_EscapeInstrument - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetEscapeWait:                   equ PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetSecondaryInstrument:          equ PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtInstrument:                 equ PLY_AKM_Track1_PtInstrument - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetInstrumentCurrentStep:        equ PLY_AKM_Track1_InstrumentCurrentStep - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetInstrumentSpeed:              equ PLY_AKM_Track1_InstrumentSpeed - PLY_AKM_Track1_Data
                        IFDEF PLY_CFG_UseEffect_SetVolume        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetTrackInvertedVolume:          equ PLY_AKM_Track1_TrackInvertedVolume - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_SetVolume
                        IFDEF PLY_AKM_USE_EffectPitchUpDown        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsPitchUpDownUsed:            equ PLY_AKM_Track1_IsPitchUpDownUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchInteger:            equ PLY_AKM_Track1_TrackPitchInteger - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchDecimal:            equ PLY_AKM_Track1_TrackPitchDecimal - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetTrackPitchSpeed:              equ PLY_AKM_Track1_TrackPitchSpeed - PLY_AKM_Track1_Data
                        ENDIF ;PLY_AKM_USE_EffectPitchUpDown
                        IFDEF PLY_CFG_UseEffect_ArpeggioTable        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsArpeggioTableUsed:          equ PLY_AKM_Track1_IsArpeggioTableUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtArpeggioTable:              equ PLY_AKM_Track1_PtArpeggioTable - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtArpeggioOffset:             equ PLY_AKM_Track1_PtArpeggioOffset - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetArpeggioCurrentStep:          equ PLY_AKM_Track1_ArpeggioCurrentStep - PLY_AKM_Track1_Data
                                IFDEF PLY_CFG_UseEffect_ForceArpeggioSpeed        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetArpeggioCurrentSpeed:         equ PLY_AKM_Track1_ArpeggioCurrentSpeed - PLY_AKM_Track1_Data
                                ENDIF ;PLY_CFG_UseEffect_ForceArpeggioSpeed
PLY_AKM_Data_OffsetArpeggioOriginalSpeed:        equ PLY_AKM_Track1_ArpeggioOriginalSpeed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetCurrentArpeggioValue:         equ PLY_AKM_Track1_CurrentArpeggioValue - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_ArpeggioTable
                        IFDEF PLY_CFG_UseEffect_PitchTable        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetIsPitchTableUsed:             equ PLY_AKM_Track1_IsPitchTableUsed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtPitchTable:                 equ PLY_AKM_Track1_PtPitchTable - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPtPitchOffset:                equ PLY_AKM_Track1_PtPitchOffset - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetPitchCurrentStep:             equ PLY_AKM_Track1_PitchCurrentStep - PLY_AKM_Track1_Data
                                IFDEF PLY_CFG_UseEffect_ForcePitchTableSpeed        ;CONFIG SPECIFIC
PLY_AKM_Data_OffsetPitchCurrentSpeed:            equ PLY_AKM_Track1_PitchCurrentSpeed - PLY_AKM_Track1_Data
                                ENDIF ;PLY_CFG_UseEffect_ForcePitchTableSpeed
PLY_AKM_Data_OffsetPitchOriginalSpeed:           equ PLY_AKM_Track1_PitchOriginalSpeed - PLY_AKM_Track1_Data
PLY_AKM_Data_OffsetCurrentPitchTableValue:       equ PLY_AKM_Track1_CurrentPitchTableValue - PLY_AKM_Track1_Data
                        ENDIF ;PLY_CFG_UseEffect_PitchTable

;Data block for channel 2.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track2_Data:
dkbs (void):
        ds PLY_AKM_Track1_Data_Size, 0
dkbe (void):
PLY_AKM_Track2_Data_End:
        ELSE
PLY_AKM_Track2_Data: equ PLY_AKM_Track1_Data + PLY_AKM_Track1_Data_Size
PLY_AKM_Track2_Data_End: equ PLY_AKM_Track2_Data + PLY_AKM_Track1_Data_Size
        ENDIF
PLY_AKM_Track2_WaitEmptyCell: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetWaitEmptyCell
PLY_AKM_Track2_PtTrack: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtTrack
PLY_AKM_Track2_PtInstrument: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtInstrument
PLY_AKM_Track2_EscapeNote: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeNote
PLY_AKM_Track2_EscapeInstrument: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeInstrument
PLY_AKM_Track2_EscapeWait: equ PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeWait

;Data block for channel 3.
        IFNDEF PLY_AKM_Rom
PLY_AKM_Track3_Data:
dkbs (void):
        ds PLY_AKM_Track1_Data_Size, 0
dkbe (void):
PLY_AKM_Track3_Data_End:
        ELSE
PLY_AKM_Track3_Data: equ PLY_AKM_Track2_Data + PLY_AKM_Track1_Data_Size
PLY_AKM_Track3_Data_End: equ PLY_AKM_Track3_Data + PLY_AKM_Track1_Data_Size

PLY_AKM_ROM_Buffer_End: equ PLY_AKM_Track3_Data_End
PLY_AKM_ROM_BufferSize: equ PLY_AKM_ROM_Buffer_End - PLY_AKM_ROM_Buffer
        
        expectedRomBufferSize = 199             ;Just to detect if the buffer grows.
                IFNDEF PLY_AKM_MANAGE_SOUND_EFFECTS
                        assert PLY_AKM_ROM_BufferSize <= expectedRomBufferSize               ;Decreases when using the Player Configuration.
                ELSE
                        assert PLY_AKM_ROM_BufferSize <= (expectedRomBufferSize + 23)        ;With sound effects, it takes a bit more memory.
                ENDIF
        ENDIF
        
        
        

PLY_AKM_Track3_WaitEmptyCell: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetWaitEmptyCell
PLY_AKM_Track3_PtTrack: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtTrack
PLY_AKM_Track3_PtInstrument: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtInstrument
PLY_AKM_Track3_EscapeNote: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeNote
PLY_AKM_Track3_EscapeInstrument: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeInstrument
PLY_AKM_Track3_EscapeWait: equ PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeWait

        ;Makes sure the structure all have the same size!
        ASSERT (PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data) == (PLY_AKM_Track2_Data_End - PLY_AKM_Track2_Data)
        ASSERT (PLY_AKM_Track1_Data_End - PLY_AKM_Track1_Data) == (PLY_AKM_Track3_Data_End - PLY_AKM_Track3_Data)
        ;No holes between the blocks, the init makes a LDIR to clear everything!
        ASSERT PLY_AKM_Track1_Data_End == PLY_AKM_Track2_Data
        ASSERT PLY_AKM_Track2_Data_End == PLY_AKM_Track3_Data



;---------------------------------------------------------------------
;Register block for all the channels. They are "polluted" with pointers to code because all this
;is actually a RET table!
;---------------------------------------------------------------------
;DB register, DB value then DW code to jump to once the value is read.
        IFNDEF PLY_AKM_Rom              ;For ROM, a table is generated.
PLY_AKM_Registers_RetTable:
PLY_AKM_Track1_Registers:
dkbs (void):   db 8
PLY_AKM_Track1_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 0
PLY_AKM_Track1_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 1
PLY_AKM_Track1_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

PLY_AKM_Track2_Registers:
dkbs (void):   db 9
PLY_AKM_Track2_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 2
PLY_AKM_Track2_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 3
PLY_AKM_Track2_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):


PLY_AKM_Track3_Registers:
dkbs (void):   db 10
PLY_AKM_Track3_Volume: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 4
PLY_AKM_Track3_SoftwarePeriodLSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):   db 5
PLY_AKM_Track3_SoftwarePeriodMSB: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):

;Generic registers.
                        IFDEF PLY_AKM_USE_NoiseRegister          ;CONFIG SPECIFIC
dkbs (void):   db 6
PLY_AKM_NoiseRegister: db 0
dkbe (void):
dkps (void):   dw PLY_AKM_SendPsgRegister
dkpe (void):
                        ENDIF ;PLY_AKM_USE_NoiseRegister

dkbs (void):   db 7
PLY_AKM_MixerRegister: db 0
dkbe (void):
        IFDEF PLY_CFG_UseHardwareSounds         ;CONFIG SPECIFIC
dkps (void):           dw PLY_AKM_SendPsgRegister
dkpe (void):
        
dkbs (void):    db 11
PLY_AKM_Reg11:  db 0
dkbe (void):
dkps (void):           dw PLY_AKM_SendPsgRegister
dkpe (void):

dkbs (void):    db 12
PLY_AKM_Reg12:  db 0
dkbe (void):
dkps (void):           dw PLY_AKM_SendPsgRegisterR13
                ;This one is a trick to send the register after R13 is managed.
                dw PLY_AKM_SendPsgRegisterAfterPop
dkpe (void):
        ENDIF ;PLY_CFG_UseHardwareSounds
dkps (void):   dw PLY_AKM_SendPsgRegisterEnd
dkpe (void):

        ENDIF ;PLY_AKM_Rom


PLY_AKM_Registers_OffsetVolume: equ PLY_AKM_Track1_Volume - PLY_AKM_Track1_Registers
PLY_AKM_Registers_OffsetSoftwarePeriodLSB: equ PLY_AKM_Track1_SoftwarePeriodLSB - PLY_AKM_Track1_Registers
PLY_AKM_Registers_OffsetSoftwarePeriodMSB: equ PLY_AKM_Track1_SoftwarePeriodMSB - PLY_AKM_Track1_Registers

;The period table for the first octave only.
PLY_AKM_PeriodTable:
dkws (void):
        IFDEF PLY_AKM_HARDWARE_CPC
        ;PSG running to 1000000 Hz.
         dw 3822,3608,3405,3214,3034,2863,2703,2551,2408,2273,2145,2025          ; Octave 0.
        ;dw 1911,1804,1703,1607,1517,1432,1351,1276,1204,1136,1073,1012          ;12
        ;dw  956, 902, 851, 804, 758, 716, 676, 638, 602, 568, 536, 506          ;24
        ;dw  478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253          ;36
        ;dw  239, 225, 213, 201, 190, 179, 169, 159, 150, 142, 134, 127          ;48
        ;dw  119, 113, 106, 100,  95,  89,  84,  80,  75,  71,  67,  63          ;60
        ;dw   60,  56,  53,  50,  47,  45,  42,  40,  38,  36,  34,  32          ;72
        ;dw   30,  28,  27,  25,  24,  22,  21,  20,  19,  18,  17,  16          ;84
        ;dw   15,  14,  13,  13,  12,  11,  11,  10,   9,   9,   8,   8          ;96
        ;dw    7,   7,   7,   6,   6,   6,   5,   5,   5,   4,   4,   4          ;108
        ;dw    4,   4,   3,   3,   3,   3,   3,   2  ;,2,   2,   2,   2          ;120 -> 127
        ENDIF

        IFDEF PLY_AKM_HARDWARE_SPECTRUM_OR_MSX
        ;PSG running to 1773400 Hz.
        dw 6778, 6398, 6039, 5700, 5380, 5078, 4793, 4524, 4270, 4030, 3804, 3591	; Octave 0.
        ENDIF

        IFDEF PLY_AKM_HARDWARE_PENTAGON
        ;PSG running to 1750000 Hz.
        dw 6689, 6314, 5959, 5625, 5309, 5011, 4730, 4464, 4214, 3977, 3754, 3543	; Octave 0.
        ENDIF
dkwe (void):
PLY_AKM_End:



Full Source

Show Source

angle_curve2
 DB 42,42,42,43,43,43,44,44,44,45,45,45,45,46,46,46,46,46,46,46,47,47,47,47,47,47,47,47,47,46,46,46,46,46,46,45,45,45,45,44,44,44,44,43,43,43,42,42,41,41,41,40,40,40,39,39,38,38,38,37,37,36,36,36,35,35,35,34,34,34,33,33,33,32,32,32,32,31,31,31,31,31,31,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,29,29,29,29,29,29,29,28,28,28,28,28,27,27,27,27,26,26,26,26,25,25,25,24,24,24,24,23,23,23,23,22,22,22,22,21,21,21,21,20,20,20,20,20,20,19,19,19,19,19,19,19,19,19,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,20,20,20,20,20,21,21,21,21,21,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,23,23,23,23,23,23,23,23,22,22,22,22,21,21,21,21,20,20,19,19,19,18,18,17,17,17,16,16,15,15,14,14,13,13,12,12,12,11,11,10,10,9,9,8,8,8,7,7,7,6,6,6,5,5,5,5,4,4,4,4,4,4,4,4,4,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,8,8,9,9,9,10,10,11,11,11,12,12,13,13,14,14,14,15,15,16,16,16,17,17,18,18,18,19,19,20,20,20,21,21,21,22,22,22,23,23,23,24,24,24,25,25,25,25,26,26,26,26,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,36,37,37,37,37,37,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,36,36,36,35,35,35,34,34,34,33,33,33,32,32,31,31,31,30,30,29,29,28,28,27,27,27,26,26,25,25,25,24,24,23,23,23,22,22,22,22,21,21,21,21,21,21,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,22,22,22,23,23,23,24,24,24,25,25,26,26,26,27,27,28,28,29,29,30,30,30,31,31,32,32,33,33,34,34,34,35,35,36,36,36,37,37,37,38,38,38,39,39,39,39,40,40,40,40,40,41,41,41,41,41,41,41,41,41,41,41,41
.end
	; 5 is juste a safety margin
	repeat ANGLE_CURVE2_SPEED*NB_CIRCLES_TO_DRAW+5, step, 0
		db memory({step}+angle_curve2)
	endr


radius_spread
   repeat NB_CIRCLES_TO_DRAW, step, 0
     db ( (NB_RADIUSES) / (NB_CIRCLES_TO_DRAW) * {step} )
   endr

	align 256
angle_curve1
	 DB 6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
.end

	align 256
empty_curve256
	defs 256, 0
.end

	align 256
radius_curve1
 	   DB 37,37,37,37,37,37,37,36,36,36,36,36,35,35,35,34,34,34,33,33,33,32,32,31,31,30,30,29,28,28,27,27,26,25,25,24,23,23,22,21,20,20,19,18,17,16,16,15,14,13,12,11,10,10,9,8,7,6,5,4,3,2,1,0,0,0,1,2,3,4,5,6,7,8,9,10,10,11,12,13,14,15,16,16,17,18,19,20,20,21,22,23,23,24,25,25,26,27,27,28,28,29,30,30,31,31,32,32,33,33,33,34,34,34,35,35,35,36,36,36,36,36,37,37,37,37,37,37,37,37,37,37,37,37,37,36,36,36,36,36,35,35,35,34,34,34,33,33,33,32,32,31,31,30,30,29,28,28,27,27,26,25,25,24,23,23,22,21,20,20,19,18,17,16,16,15,14,13,12,11,10,10,9,8,7,6,5,4,3,2,1,0,0,0,1,2,3,4,5,6,7,8,9,10,10,11,12,13,14,15,16,16,17,18,19,20,20,21,22,23,23,24,25,25,26,27,27,28,28,29,30,30,31,31,32,32,33,33,33,34,34,34,35,35,35,36,36,36,36,36,37,37,37,37,37,37

    align 256
radius_curve3
 DB 10,11,11,11,12,12,13,13,14,14,14,15,15,16,16,17,17,17,18,18,19,19,19,20,20,21,21,21,22,22,22,23,23,23,24,24,24,25,25,26,26,26,26,27,27,27,28,28,28,29,29,29,29,30,30,30,31,31,31,31,32,32,32,32,32,33,33,33,33,33,34,34,34,34,34,35,35,35,35,35,35,35,36,36,36,36,36,36,36,36,36,36,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,36,36,36,36,36,36,36,36,36,36,35,35,35,35,35,35,35,34,34,34,34,34,34,33,33,33,33,32,32,32,32,32,31,31,31,31,30,30,30,30,29,29,29,28,28,28,27,27,27,27,26,26,26,25,25,25,24,24,23,23,23,22,22,22,21,21,21,20,20,19,19,19,18,18,17,17,17,16,16,15,15,15,14,14,13,13,12,12,12,11,11,10,10,9,9,8,8,8,7,7,6,6,5,5,4,4,3,3,3,2,2,1,1,0,0,0,0,1,1,2,2,2,3,3,4,4,5,5,6,6,7,7,7,8,8,9,9,10



	align 256
radius_curve2
 DB 37,37,37,37,37,37,37,36,36,36,36,36,35,35,35,34,34,34,33,33,33,32,32,31,31,30,30,29,28,28,27,27,26,25,25,24,23,23,22,21,20,20,19,18,17,16,16,15,14,13,12,11,10,10,9,8,7,6,5,4,3,2,1,0,0,0,1,2,3,4,5,6,7,8,9,10,10,11,12,13,14,15,16,16,17,18,19,20,20,21,22,23,23,24,25,25,26,27,27,28,28,29,30,30,31,31,32,32,33,33,33,34,34,34,35,35,35,36,36,36,36,36,37,37,37,37,37,37,37,37,37,37,37,37,37,36,36,36,36,36,35,35,35,34,34,34,33,33,33,32,32,31,31,30,30,29,28,28,27,27,26,25,25,24,23,23,22,21,20,20,19,18,17,16,16,15,14,13,12,11,10,10,9,8,7,6,5,4,3,2,1,0,0,0,1,2,3,4,5,6,7,8,9,10,10,11,12,13,14,15,16,16,17,18,19,20,20,21,22,23,23,24,25,25,26,27,27,28,28,29,30,30,31,31,32,32,33,33,33,34,34,34,35,35,35,36,36,36,36,36,37,37,37,37,37,37
	repeat NB_CIRCLES_TO_DRAW*2, step, 0
		db memory({step}+radius_curve2)
	endr 



Show Source



	org 0x180

	include "../linking/src/demosystem/common.asm"
	include "../../linking/src/demosystem/linker_common.asm"

; As the loader is at the bottom of the memory and as files are quite large,
; the best choice is to use a loader which uncrunches backwards, from high addresses to low addresses.
; there is only one such cruncher in basm: LZX0 backward.
SELECTED_CRUNCHER = CRUNCHER_ZX0_BACKWARD

FIRST_BYTE_ADDRESS = 0x800 ; TODO move to 0x200


	run $
	di
	ld hl, 0xc9fb
	ld (0x38), hl
	ld sp, $

	BREAKPOINT


	ld bc, 0x7fc7 : out (c), c
	UNCRUNCH(C7_4000, 0x4000)

	ld bc, 0x7fc6 : out (c), c
	UNCRUNCH(C6_4000, 0x4000)

	ld bc, 0x7fc0 : out (c), c
	MOVE_CRUNCHED_DATA(C5_4000, 0xc000)
	ld bc, 0x7fc5 : out (c), c
	INDIRECT_UNCRUNCH(0xc000, C5_4000, 0x4000)

	ld bc, 0x7fc0 : out (c), c
	MOVE_CRUNCHED_DATA(C4_4000, 0xc000)
	ld bc, 0x7fc4 : out (c), c
	INDIRECT_UNCRUNCH(0xc000, C4_4000, 0x4000)

	ld bc, 0x7fc0 : out (c), c
	UNCRUNCH(C0_C000, 0xC000)
	UNCRUNCH(C0_8000, 0x8000)
	UNCRUNCH(C0_4000, 0x4000)
	UNCRUNCH(C0_2E00, 0x2E00)
	UNCRUNCH(C0_1000, FIRST_BYTE_ADDRESS)


	jp FIRST_BYTE_ADDRESS


	INSTALL_UNCRUNCHER()
	assert $< FIRST_BYTE_ADDRESS, "the cruncher overlaps with the code to run"

    ; all the data to uncrunch for the demo
	LOAD_N_CRUNCH(C0_1000, "C0.1000")
	LOAD_N_CRUNCH(C0_C000, "C0.C000")
	LOAD_N_CRUNCH(C0_2E00, "C0.2E00")
	LOAD_N_CRUNCH(C0_4000, "C0.4000")
	LOAD_N_CRUNCH(C0_8000, "C0.8000")
	LOAD_N_CRUNCH(C4_4000, "C4.4000")
	LOAD_N_CRUNCH(C5_4000, "C5.4000")
	LOAD_N_CRUNCH(C6_4000, "C6.4000")
	LOAD_N_CRUNCH(C7_4000, "C7.4000")


	SAVE "POLAR.BIN"

Full Source

Show Source
;;
; here we should find all the necessary code for the multimode part of the radial screen.
; Initial version written by Eliot in October 2024
; Adaptation by Krusty in the remaining weeks

; TODO stabilize the drawing code
; TODO shrink code to fit everything in memory

; parametable HEIGHT_AT_XPOSs from top to bottom
; top zone
HEIGHT_AT_XPOS15 equ 3/2
HEIGHT_AT_XPOS14 equ 4/2
HEIGHT_AT_XPOS13 equ 5/2+1
HEIGHT_AT_XPOS12 equ 6/2-1
HEIGHT_AT_XPOS11 equ 7/2
HEIGHT_AT_XPOS10 equ 4+2+1
HEIGHT_AT_XPOS9 equ 5+5-1
HEIGHT_AT_XPOS8 equ 6+7-5+1-2
HEIGHT_AT_XPOS7 equ 1 ; unused now!

; Size before using the macro 0x200f bytes
; Size after using the macro 0x1c8d bytes


multimode_handle_top_corner
	
	MULTIMODE_WAIT (64 - (&2c-&1c)  - (3+4) )
	ld l, CRTC_REG2_VALUE
	;breakpoint addr=$
 ; acebrk MEM,RW,STOP,addr=364,mask=65535,size=1,value=0,valmask=0,name="check_hcc_top",condition="C3H=0x1c";

; IMPORTANT *****************************
; start at HCC = &1C
; 

	breakpoint name="check_hcc_top_position", condition="C0<>&1C"; HCC != &1C

	exx
; preload the 2 MODEs
; H=left mode
; L=right mode  
;
	ld bc,&7f00
	ld hl,&8C8D
	exx
	MULTIMODE_WAIT(22+8)
; Pos 15
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a
	ld bc,&bc03
	ld a,&8e
	out (c),c
	inc b
	out (c),a
	ld de,&0207
;
	MULTIMODE_WAIT(22+1+5)
;
ADAP_REG2_TOP1	ld h,15
	repeat HEIGHT_AT_XPOS15
		MULTIMODE_WAIT(4)
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
	rend
;
; Transition 15 -> Pos 14
	MULTIMODE_WAIT(4)
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10-2)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2+2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
	MULTIMODE_WAIT(8-2)
; ***
ADAP_REG2_TOP2	ld h,14
;	repeat HEIGHT_AT_XPOS14

        ld a,HEIGHT_AT_XPOS14
LOOP_HEIGHT_AT_XPOS14				
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10-2)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2+2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		dec a
        jr nz,LOOP_HEIGHT_AT_XPOS14
;		MULTIMODE_WAIT(4)
;	rend
;
; Transition 14 -> Pos 13
;	defs 4-3,0
	exx
	out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10-2)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2+2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
; ***
ADAP_REG2_TOP3	ld h,13
	repeat HEIGHT_AT_XPOS13
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
		MULTIMODE_WAIT(6)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend

; Transition 13 -> Pos 12
;	defs 4-3-,0
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
; ***
ADAP_REG2_TOP4	ld h,12
	repeat HEIGHT_AT_XPOS12
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend
;
; Transition 12 -> Pos 11
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
; ***
ADAP_REG2_TOP5	ld h,11
;
	repeat HEIGHT_AT_XPOS11
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend
;
; Transition 11 -> Pos 10
;
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
	MULTIMODE_WAIT(4-1)
; ***
ADAP_REG2_TOP6	ld h,10
	repeat HEIGHT_AT_XPOS10
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6-2)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10+2)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend
;
; Transition 10 -> Pos 9
;
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
	MULTIMODE_WAIT(4-1-1)
; ***
ADAP_REG2_TOP7	ld h,9
	repeat HEIGHT_AT_XPOS9
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6-2)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10+2)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend
;
; Transition 9 -> Pos 8
;
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
	MULTIMODE_WAIT(4-1-1-1)
; ***
ADAP_REG2_TOP8	ld h,8
 	repeat HEIGHT_AT_XPOS8
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6-2)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10+2)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
 	rend

; 
; back to standard screen 
;
	exx
		out (c),l
	exx
 	MULTIMODE_WAIT(10+2-1)
	ld bc,&bc02
	ld l,Reg2
	out (c),c
	inc b
	out (c),l
	ld bc,&bc03
	ld a,&0e
	out (c),c
	inc b
	out (c),a

	ret


;
; Transition 8 -> Pos 7
;
	exx
		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
	exx

	
	MULTIMODE_WAIT(6)
	out (c),e   ; envoie R3 ecran 2
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b
	out (c),l   ; envoie R2 ecran 2
	MULTIMODE_WAIT(10)
	exx
		out (c),h   ; MODE gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; envoie R2 ecran 1
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b		
	out (c),d   ; envoie R3 ecran 1
; 	
; ***
	ld h,7
	repeat HEIGHT_AT_XPOS7
		exx
			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
		exx
		MULTIMODE_WAIT(6-2)
		out (c),e   ; envoie R3 ecran 2
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b
		out (c),l   ; envoie R2 ecran 2
		MULTIMODE_WAIT(10+2)
		exx
			out (c),h   ; MODE gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; envoie R2 ecran 1
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b		
		out (c),d   ; envoie R3 ecran 1
		MULTIMODE_WAIT(4)
	rend




multimode_wait
	defs MULTIMODE_WAIT_MAXIMAL_DURATION - MULTIMODE_WAIT_MINIMAL_DURATION, 0
.end	
	ret

Full Source

Show Source

	assert $==0x4000


	;;
	; Be sure interruptions are disabled when called
	macro PLAY_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			call PLY_AKM_Play
		ld bc, &7f00 + &c0 : out (c), c
	endm
	

	macro INIT_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			ld hl, music_data
			xor a
			call PLY_AKM_Init
		ld bc, &7f00 + &c0 : out (c), c
	endm

	macro STOP_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			call PLY_AKM_Stop
		ld bc, &7f00 + &c0 : out (c), c
	endm

	PLY_AKM_STOP_SOUNDS equ 1
	include AKM_CFG
music_data
	include AKM
	;include "PlayerAkm_basm.asm"
	include "PlayerAkmDevelop.asm"

Full Source

Show Source
	include once "../linking/src/demosystem/public.asm"
	include once "../linking/src/limited_duration.asm"


NB_CIRCLES_TO_DRAW equ 35 ; This is the perfect number for the various timings of the demo
DO_ERASE equ true
DO_MULTIMODE equ true
MAX_AMOUNT_TO_RECOVER equ 70
RASTER_PEN equ 1
RASTER_INKS = [64, 93, 95, 94, 71] ; 13,5,14,12,16 (last one could be also 15->78)
;;RASTER_INKS = [91, 67, 91, 67, 78] ; inks with the GA format 
;;
REG2_VALUE_FOR_HBL_BOTTOM_CRTC34  equ 32-1-1
REG2_VALUE_FOR_HBL_TOP_CRTC34    equ 15-1
; bottom zone
HEIGHT_AT_XPOS32 equ 16/2-1
HEIGHT_AT_XPOS31 equ 12/2-1
HEIGHT_AT_XPOS30 equ 10/2
HEIGHT_AT_XPOS29 equ 6/2+1+1
HEIGHT_AT_XPOS28 equ 5/2+1
HEIGHT_AT_XPOS27 equ 4/2+1
HEIGHT_AT_XPOS26 equ 3/2-1-1
HEIGHT_AT_XPOS25 equ 3/2

CRTC_REG3_DEFAULT_VALUE equ &8e
CRTC_REG2_VALUE	equ  &2e		; &32 for fullscreen
Reg2 equ CRTC_REG2_VALUE ; TODO remove that ASAP and use the better name


MULTIMODE_WAIT_MAXIMAL_DURATION = 128
MULTIMODE_WAIT_MINIMAL_DURATION = 5 + 3 ; duration(CALL 0) + duration(RET)
	macro MULTIMODE_WAIT duration
		assert {duration} < MULTIMODE_WAIT_MAXIMAL_DURATION

		if {duration} < MULTIMODE_WAIT_MINIMAL_DURATION
			defs {duration}, 0
		else
			call multimode_wait.end - ({duration}-MULTIMODE_WAIT_MINIMAL_DURATION)
		endif
;			BREAKPOINT
;			call multimode_wait + {duration} - MULTIMODE_WAIT_MINIMAL_DURATION
;		endif
	endm

macro MULTIMODE_HANDLE_BOTTOM_CORNER

    
	MULTIMODE_WAIT(64 - (&26 - &1C) + &10 + 4-4 ) 

	ld l, CRTC_REG2_VALUE
;	BREAKPOINT CONDITION="C0<>&26"
; IMPORTANT *****************************
; start at HCC = &26
; 	
	exx
; preload the 2 MODEs
; H=left mode
; L=right mode  
;
	ld bc,&7f00
	ld hl,&8C8D    
	exx
;
	ld bc,&bc03
	ld a,&8e
	out (c),c
	inc b
	out (c),a
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a
;
; maximal on RIGHT 
; HBL POS = 32
;
           	ld de,&0207
ADAP_REG2_BOTTOM1	ld h,32-1
	        MULTIMODE_WAIT(22+1+5+1+4+6+2+2+2+2+2-2)

;	repeat HEIGHT_AT_XPOS32

        ld a,HEIGHT_AT_XPOS32

LOOP_HEIGHT_AT_XPOS32

		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; = 2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6-4)
		dec a
		jr nz,LOOP_HEIGHT_AT_XPOS32
;	rend
;
; Transition 32 -> Pos 31
;
	MULTIMODE_WAIT(&22-20+1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4-2)
;
ADAP_REG2_BOTTOM2	ld h,31-1
;
;	repeat HEIGHT_AT_XPOS31
       ld a,HEIGHT_AT_XPOS31
LOOP_HEIGHT_AT_XPOS31
		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6-4)
		dec a
		jr nz,LOOP_HEIGHT_AT_XPOS31
;	rend
;
; Transition 31 -> Pos 30
;
	MULTIMODE_WAIT(&22-20+1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM3	ld h,30-1
;
	repeat HEIGHT_AT_XPOS30
		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6)
	rend
;
; Transition 30 -> Pos 29
;
	MULTIMODE_WAIT(&22-20)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM4	ld h,29-1
;
	repeat HEIGHT_AT_XPOS29
		MULTIMODE_WAIT(&22-20-1)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6+1)
	rend
;
; Transition 29 -> Pos 28
;
	MULTIMODE_WAIT(&22-20-1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM5	ld h,28-1
;
	repeat HEIGHT_AT_XPOS28
		MULTIMODE_WAIT(&22-20-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(8)
	rend
;
; Transition 28 -> Pos 27
;
	MULTIMODE_WAIT(&22-20-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(6)
;
ADAP_REG2_BOTTOM6	ld h,27-1
;
	repeat HEIGHT_AT_XPOS27
		MULTIMODE_WAIT(&22-20-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(8)
	rend
;
;
; Transition 27 -> Pos 26
;
	MULTIMODE_WAIT(&22-20-2-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(8)
;
ADAP_REG2_BOTTOM7	ld h,26-1
;
	repeat HEIGHT_AT_XPOS26
		MULTIMODE_WAIT(&22-20-2-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(10)
	rend
;
; Transition 26 -> Pos 25
;
	MULTIMODE_WAIT(&22-20-2-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(8)
;
ADAP_REG2_BOTTOM8	ld h,25-1
;
	repeat HEIGHT_AT_XPOS25
		MULTIMODE_WAIT(&22-20-2-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(10)
	rend
;
	out (c),l
;
	ld bc,&bc03
	ld a,CRTC_REG3_DEFAULT_VALUE  ; 
	out (c),c
	inc b
	out (c),a
	endm

; Here we try to speed up the code selection stuff
polar_screen


.prepare

	
	ld bc, 0xbc03 : out (c), c 
	ld bc, 0xbd00 + 0x8e : out (c), c

     call CRTC_ADAPTATION

    ; &C000 already contains the pixels
    ; So here we just get the palette
    ld hl, screen_palette_top
	call polar_screen_setup_palette

; screen in white
	if false	
		ld bc, 0x7F00 : out (c), c
		ld bc, 0x7F4b : out (c), c
	endif
	
	if DO_MULTIMODE
		; Setup the R2 value needed for the multimode
		;
	;	ld bc,&bc02
	;	ld a,CRTC_REG2_VALUE
	;	out (c),c
	;	inc b
	;	out (c),a

		halt : DS_CRTC_HORIZONTAL_TRANSITION_ONLY(0x32,  CRTC_REG2_VALUE)
	endif




.init_music
	INIT_MUSIC()

.init
	; XXX it has to be called one time before drawing everything
	call polar_screen_select_routines
	call polar_screen_switch_buffers

	call polar_install_scenario
	ei
;

	; ensure we are properly aligned with halts
	DS_SECURE_WAIT_VSYNC()


	halt : halt : halt 
	halt : halt  : halt
	ld hl, screen_palette_top
	call polar_screen_setup_palette
.loop
	halt

	; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING  
	; WARNING Each time nops are added or removed, it is necessary to update WARNING
	; WARNING multimode_handle_top_corner wait nops at the beginning of the function
	; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING  
	 

	ld bc, &7f8c : out (c), c // start in mode 0



		; TODO find a way to be stable here !!
		ld bc, 0x7f00 + RASTER_PEN : out (c), c : ld bc, 0x7f00 +  list_get(RASTER_INKS, 0) : out (c), c
		call polar_screen_draw_or_erase_routines
;		ld bc, 0x7f03 : out (c), c : ld bc, 0x7f00 + 68 : out (c), c
		defs 14,0
	;	ld b, 2 : .wait_lines1: defs 64-4 : djnz .wait_lines1


		ld bc, 0x7f00 + RASTER_PEN : out (c), c : ld c, list_get(RASTER_INKS, 1) : out (c), c

	if DO_MULTIMODE
		di
			call multimode_handle_top_corner
		ei
	else

		ei : nop
		halt :
	 	halt
	endif
	
		; select next routines
		ld bc, 0x7f00 + RASTER_PEN : out (c), c : ld bc, 0x7f00+list_get(RASTER_INKS, 2): out (c), c
		call polar_screen_select_routines
		call polar_install_scenario
		ei

		ld bc, 0x7f00 + RASTER_PEN : out (c), c : ld bc, 0x7f00 + list_get(RASTER_INKS, 3) : out (c), c
		PLAY_MUSIC()
		;ld hl, screen_palette_bottom + 4 : ld a, 4
		;call polar_screen_setup_palette.skip_pens
		;ld bc, 0x7f00 + RASTER_PEN : out (c), c : ld bc, 0x7f00 + list_get(RASTER_INKS, 3) : out (c), c

	; XXX this is here we have remaining machine time



	halt
		; wait
		di
		; 222 nops
		ld hl, screen_palette_bottom	 + 4 : ld a, 4
		call polar_screen_setup_palette.skip_pens

		ld b, 10-4 : .wait_lines2: defs 64-4 : djnz .wait_lines2

	 
		ld hl, 0x5c4c
		ld de, 0x4e47 
		ld bc, 0x7f00 + RASTER_PEN 
		out (c), c 

		push hl, de
		
		defs 32 - duration(inc c) - duration(out (c),c) -  3*(duration(ld hl, 0) + duration(push bc))+1,0
		
		ld bc, 0x7f00 + list_get(RASTER_INKS, 4) : out (c), c
		ld c, 9 : out (c), c : inc c : push bc
		

	if 	DO_MULTIMODE
		if true
		;	breakpoint
			defs 2-1 + duration(call 0),0
VARIABLE_START_FOR_MULTIMODE_BOTTOM_CORNER JR $+2
            nop
			MULTIMODE_HANDLE_BOTTOM_CORNER() ; Activating it raise an infinite loop at first halt
		
		else
			ld bc,&bc03
			ld a,CRTC_REG3_DEFAULT_VALUE  ; 
			out (c),c
			inc b
			out (c),a
		endif

	else
		ei : nop
		halt
		halt
		ld b, 120 :  djnz $
		di
	endif
	ei

	pop bc, de, hl
	out (c), h
	out (c), c : out (c), l : inc c
	out (c), c : out (c), d  : inc c
	out (c), c : out (c), e 

		; erase and switch
		if DO_ERASE
			call polar_screen_draw_or_erase_routines ; SP is used but it sees ok to activate interupts
		endif


		call polar_screen_switch_buffers

		;ld hl, screen_palette_top	 + 4 : ld a, 4
		;call polar_screen_setup_palette.skip_pens

	; check if we leave because of timing
	CHECK_IF_PART_IS_OVER()
	jr z, leave_polar_screen

	; check if we leave because of key press
	DS_KEYSPACE()
	jp c, loop" class="symbol-link">polar_screen.loop

leave_polar_screen

; handle next screen loading
	STOP_MUSIC()

	ld bc, 0xbc00 + 1 : out (c), c
	ld bc, 0xbd00 + 0 : out (c), c

	assert $>0x100
	di
		ld hl, start_loader
		ld de, 0x100
		ld bc, stop_loader - start_loader
		ldir
		ld sp, 0x100 - 2
		ld hl, 0x9fb : ld (0x38), hl
	ei
	jp 0x100
start_loader
	rorg 0x100
		include "../linking/src/load_make_it_easy_loader.asm"
	rend
stop_loader

	ret

CRTC_ADAPTATION
; I is supposed to contain the CRTC TYPE !
CRTC_TYPE   ld a,i
;
;  ld a,4
; breakpoint 
   cp 3
   jr z,CRTC_3_4_ADAPTATION
   cp 4
   jr nz,START_AFTER_CRTC_ADAPTATION
; 168 lines  
CRTC_3_4_ADAPTATION
;
   ld a,REG2_VALUE_FOR_HBL_TOP_CRTC34 
   ld (ADAP_REG2_TOP1+1),a
   dec a
   ld (ADAP_REG2_TOP2+1),a
   dec a
   ld (ADAP_REG2_TOP3+1),a
   dec a
   ld (ADAP_REG2_TOP4+1),a
   dec a
   ld (ADAP_REG2_TOP5+1),a
   dec a	
   ld (ADAP_REG2_TOP6+1),a
   dec a
   ld (ADAP_REG2_TOP7+1),a
   dec a
   ld (ADAP_REG2_TOP8+1),a
;
   ld a,REG2_VALUE_FOR_HBL_BOTTOM_CRTC34  ; 
   ld (ADAP_REG2_BOTTOM1+1),a
   dec a
   ld (ADAP_REG2_BOTTOM2+1),a
   dec a
   ld (ADAP_REG2_BOTTOM3+1),a
   dec a
   ld (ADAP_REG2_BOTTOM4+1),a
   dec a
   ld (ADAP_REG2_BOTTOM5+1),a
   dec a	
   ld (ADAP_REG2_BOTTOM6+1),a
   dec a
   ld (ADAP_REG2_BOTTOM7+1),a
   dec a
   ld (ADAP_REG2_BOTTOM8+1),a
;
   ld a,1
   ld (VARIABLE_START_FOR_MULTIMODE_BOTTOM_CORNER+1),a

;
START_AFTER_CRTC_ADAPTATION
   ret
;;
; Compute the routines that will be used to draw the circles
polar_screen_select_routines
	ld (.restore_sp), sp
	ld sp, (polar_screen_frame_configuration.table_a)


	; The very first item stored (so the last to popup is the end of the code)
	ld de, polar_screen_draw_or_erase_routines.finish : push de ; end of code
	ld de, 0x7fc0 : push de ; standard bank configuration



ANGLE_CURVE2_SPEED = 1

	;; this one is a huge table
	ld hl, angle_curve2
.angle_curve2ptr equ $ - 2
	defs 4, 0
	ld (.angle_curve2ptr), hl

	ld bc, angle_curve2.end
.angle_curve2_endptr equ $-2
	or a : sbc hl, bc
	ld a, h : or l
	jr nz, .continue_curve2
	ld hl, angle_curve2
.angle_curve2ptr2 equ $ - 2
	
	ld (.angle_curve2ptr), hl
.continue_curve2
	ld hl, (.angle_curve2ptr)



	;; this one is a tiny 256 bytes curve
	ld de, angle_curve2
.angle_curve1ptr equ $ - 2
	;nop 
	;nop
	;nop
	dec e
	dec e
	dec e
	ld (.angle_curve1ptr), de
	exx



	ld ix, radius_curve1
.radus_curve1 equ $-2
	ld iy, radius_curve2
.radus_curve2 equ $-2


	dec ixl
	inc iyl
	inc iyl
	inc iyl 
	
	; XXX deactivate while debugging radius
	
	ld (.radus_curve1), iy
	ld (.radus_curve2), ix

.loop



	repeat  NB_CIRCLES_TO_DRAW, i


		; compute radius curve
		ld a, (ix+0) : add (iy+0)
		inc ixl: dec iyl
		;ld a, 0 ; <===========
		ex af, af'

		; compute rotation curve
		exx
		ld a, (de)  : inc e : inc e
		rra
		add (hl) : 
		repeat ANGLE_CURVE2_SPEED
			inc l
		endr
		;ld a, 0 ; <===========
		and 7
		exx

		ex af, af' : ld l, a : ex af, af'


		; select one circle and store the table address in hl
		;ld l, NB_RADIUSES - 2*{i} -1  
		ld bc, circle_drawing_lut
		call get_circle_table_address

		; store the appropriate information in the stack
		ld e, (hl) : inc hl : ld d, (hl) : inc hl : push de ; => code address
		ld e, (hl) : ld d, &7f : push de ; => the memory configuration

	endr



.save_sp_position_for_drawing
	ld (polar_screen_frame_configuration.next_frame_read), sp

	ld sp, 0xdead
.restore_sp equ $-2
	ret




;;
; Draw the circles.
; At the same time update the buffer to erase the circle at next call
; The very same code is used for drawing or erasing a circle
polar_screen_draw_or_erase_routines
    di
	ld (.restore_sp), sp
 
.bootstrap
	ld sp, polar_screen_drawing_table1 ; XXX the real address is provided by the circle selection routine
.start_buffer equ $ -2
	; the next 3 lines are needed to handle erase code

	if BIENVOIR
	;	ld a, 0xffff
	xor a
	else
		xor a ; serve just to erase
	endif
	ld ix, polar_screen_handle_next_circle_or_end.true_code
	jp ix ; execute the first drawing or erasing routine
          ; jp ix is faster and smaller than jp nn 

.finish ; after the last selected circle, we jump here
	ld sp, 0xdead ; restore the former sp value
.restore_sp equ $-2
    ei
	ret

;;
; The stack point on the data stuff
	defs MAX_AMOUNT_TO_RECOVER
polar_screen_handle_next_circle_or_end
    pop bc; eat the call address don
.true_code
	pop bc : out (c), c ; Select the appropriate bank
	ret ; select the appropriate routine


    ;;
    ; Generate the tables for will contain plot and erase routines
    macro GENERATE_SCREEN_DRAWING_TABLE
    	defs 16 ; safety area because we are using the stack when filling it
	    defs (1+NB_CIRCLES_TO_DRAW)*4, 0 ; address of routine + bank configuration with 7f
    endm

;;
; The table is read and overrided at drawing step
polar_screen_drawing_table1
	GENERATE_SCREEN_DRAWING_TABLE(void)
.end

polar_screen_drawing_table2
	GENERATE_SCREEN_DRAWING_TABLE(void)
.end

polar_screen_switch_buffers
	ld hl, (polar_screen_frame_configuration.table_a)
	ld de, (polar_screen_frame_configuration.table_b)
	ld (polar_screen_frame_configuration.table_a), de
	ld (polar_screen_frame_configuration.table_b), hl

	ld hl, (polar_screen_frame_configuration.next_frame_read)
	ld (polar_screen_draw_or_erase_routines.start_buffer), hl

	ret


polar_screen_frame_configuration
.table_a
	dw polar_screen_drawing_table1.end
.table_b
	dw polar_screen_drawing_table2.end
.next_frame_read
	dw 0xdead


;;
; Input: HL = palette address
polar_screen_setup_palette
    xor a
.skip_pens
    ld b, &7f
.ga_loop
        out (c), a  : 
		outi : inc b		
        inc a : cp 17
    jr nz, .ga_loop
	ret


	include "curves.asm"



;;
; Input :
; L: radius (6 bits)
; a: rotation (3 bits)
; BC: drawing or erasing table
; Output :
; HL = adress of the description table
get_circle_table_address

	assert NB_ROTATIONS <= pow(2, 3+1)
	assert NB_RADIUSES <= pow(2, 6+1)

	; HL = L << 3
	ld h, 0
	repeat 3
		sla l
		rl h
	endr

	; HL = circle number
	or l : ld l, a

	; position in the table
	ld de, hl
	add hl, hl
	add hl, de

	; position in memory
	add hl, bc
	ret



    screen_palette_top if BIENVOIR=1 

					db 0x4b
					 incbin "screen1.ga", 1 , 4	; XXX to change whne voxy will finish it
					 defs 16-4, 0x45
					else if true
					 incbin "screen0_top.ga"
			;	defb 84,68,93,91
			;	defb 87,85,68,88,86,93,68
		;		defb 77,76,90,78,84
					else
					 db 0x4b
					 incbin "screen0_top.ga", 1, 4	
					 defs 16-4, 0x5d
					endif

	screen_palette_bottom  
		incbin "screen0_bottom.ga",0,13; only 13 inks are used in the bottom part
		incbin "screen0_top.ga", 13, 3 ; the last 3 are black
    if DO_MULTIMODE
		include "multi_mode.asm"
	endif
	include "scenario.asm"
	; all generated code will be split correctly within its sections
	include "../generated.asm"

Full Source

Show Source
	include once "../linking/src/demosystem/public.asm"


	org 0x180
	run $

	ld hl, 0xc9fb : ld (0x38), hl

	jp show_image
loader_start
	rorg 0x50
load_next
	include "../linking/src/load_outer_space.asm"
	;include "../linking/src/load_make_it_easy.asm"

	rend
loader_stop

show_image
	include "../linking/src/demosystem/linker_common.asm"
	SELECTED_CRUNCHER=CRUNCHER_EXOMIZER



	; CRTC input state

	; R4=38

	; R7=0

	; R1=0


	; DO the CRTC transition

	; DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC(0, 0x1e, 0x32, 0x2e)

	ei
	DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(0x1c, 0x1e) ; this is ok


; no need to do a R2 trnasition !

;	halt : DS_CRTC_HORIZONTAL_TRANSITION_ONLY(0x32,  &2e) ; Seems to be OK


	ld bc, 0xbc01 : out (c), c 
	ld bc, 0xbd00 + 96/2 : out (c), c

;	ld bc, 0xbc02 : out (c), c 

;	ld bc, 0xbd00 + 0x32 : out (c), c


;	ld bc, 0xbc07 : out (c), c 

;	ld bc, 0xbd00 + 0x1e : out (c), c



	ld bc, 0xbc06 : out (c), c 
	ld bc, 0xbd00 + 25 : out (c), c


	ld bc, 0xbc03 : out (c), c 
	ld bc, 0xbd00 + 0x8e : out (c), c


	ld hl, palette_fadein.data
	call palette_fadein.set_palette

	ld bc, 0x7f10 : out (c), c
	ld bc, 0x7f54 : out (c), c

    UNCRUNCH C000, 0xc000

	ld bc, 0xbc00 + 12
	ld hl, 0x3000
	out (c), c : inc b : out (c), h : dec b : inc c
	out (c), c : inc b : out (c), l

palette_fadein

.loop
	DS_SECURE_WAIT_VSYNC()

	; select the right palette

	ld hl, .data
.palette_address equ $-2
	call .set_palette

	; change the palette every x frames

	ld a, 4
.wait equ $-1
	inc a : and %11
	ld (.wait), a
	jp nz, .loop

	ld hl, (.palette_address)
	ld de, 4
	add hl, de
	ld (.palette_address), hl

	ld a, (hl) : or a
	jp nz, .loop

	di
		ld sp, 0xc000
	ei
	ld hl, loader_start
	ld de, load_next
	ld bc, loader_stop-loader_start
    ldir

	jp load_next
	
.set_palette
	ld b, 0x7f : xor a
.ga_loop
	ld c, (hl)
	out (c), a
	out (c), c

	inc hl
	inc a
	cp 4 : jp nz, .ga_loop
	ret

.data
	incbin "../../polar_dots/loading_fadeout.ga", 4*16, 4
	incbin "../../polar_dots/loading_fadeout.ga", 3*16, 4
	incbin "../../polar_dots/loading_fadeout.ga", 2*16, 4
	incbin "../../polar_dots/loading_fadeout.ga", 1*16, 4
	incbin "../../polar_dots/loading_fadeout.ga", 0*16, 4
	db 0


	INSTALL_UNCRUNCHER()



	LOAD_N_CRUNCH C000, "loading.scr"



	SAVE "POLAR.LOA"

Full Source

Show Source

polar_install_scenario
	ld hl, 1
.wait equ $-2
	dec hl
	ld (.wait), hl

	ld a, h
	or l
	ret nz

	ld a, 0
	or a
	jr nz, .not_first_time
.first_time
	ld de, 50*10/2
	jr .save_time
.not_first_time
	ld de, 50*10
.save_time
	ld (.wait), de

	ld hl, .table" class="symbol-link">polar_scenarios.table
.table equ $-2
.restart
	ld e, (hl) : inc hl
	ld d, (hl) : inc hl

	ld a, e: or d
	jr nz, .continue

	ld hl, polar_scenarios.restart

	jr .restart
	
.continue
	ld (.table), hl

	ld hl, de

	ld de, polar_screen_select_routines.angle_curve2ptr
	ld bc, 6 : ldir
	ld de, (polar_screen_select_routines.angle_curve2ptr)
	ld (polar_screen_select_routines.angle_curve2ptr2), de

	ld e, (hl) : inc hl : ld d, (hl) : inc hl
	ld (polar_screen_select_routines.angle_curve2_endptr), de

	ld de, polar_screen_select_routines.angle_curve1ptr
	ld bc, 5 : ldir

	ld e, (hl) : inc hl : ld d, (hl) : inc hl
	ld (polar_screen_select_routines.radus_curve1), de

	ld de, polar_screen_select_routines.radus_curve2
	ld bc, 2*5 : ldir

	ret


polar_scenarios

.table
	dw .scenario7

.restart

	dw .scenario8

	dw .scenario6
	dw .scenario5
	dw .scenario4
	dw .scenario1
	dw .scenario2
	dw .scenario3
	dw 0


.scenario8
	dw empty_curve256 ; address of first curve
	nop  : nop : nop : nop   ; frame displacement of first curve (4 bytes)
	dw empty_curve256.end     ; last address of first curve

	dw angle_curve2         ; address of the second angle curve (256 bytes aligned)
	inc e: inc e: nop ;inc e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve2       ; first radius curve (256 bytes aligned)
	dw radius_curve1       ; second radius curve (256 bytes aligned)
	inc ixl   ; radius curve 1 & 2 frame displacement
	inc ixl 
	inc ixl
	inc ixl


.scenario7
	dw empty_curve256 ; address of first curve
	nop : nop : nop : nop ; frame displacement of first curve (4 bytes)
	dw empty_curve256.end     ; last address of first curve

	dw empty_curve256         ; address of the second angle curve (256 bytes aligned)
	nop : nop : nop ; displacement per frame (3 bytes)

	dw radius_spread; second radius curve (256 bytes aligned)
	dw empty_curve256; second radius curve (256 bytes aligned)
	nop : nop ; inc ixl  ; radius curve 1 & 2 frame displacement
	nop : nop ; inc iyl 
	nop : nop ;inc iyl
	nop : nop


.scenario6
	dw angle_curve2			; address of first curve
	inc hl : inc hl : inc hl : nop   ; frame displacement of first curve (4 bytes)
	dw angle_curve2.end     ; last address of first curve

	dw angle_curve1         ; address of the second angle curve (256 bytes aligned)
	dec e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve3 + 13       ; first radius curve (256 bytes aligned)
	dw radius_curve1       ; second radius curve (256 bytes aligned)
	dec ixl   ; radius curve 1 & 2 frame displacement
	inc iyl
	inc iyl
	inc iyl 


.scenario5
	dw angle_curve2			; address of first curve
	inc hl : inc hl : nop : nop   ; frame displacement of first curve (4 bytes)
	dw angle_curve2.end     ; last address of first curve

	dw angle_curve1         ; address of the second angle curve (256 bytes aligned)
	dec e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve2       ; first radius curve (256 bytes aligned)
	dw radius_curve1       ; second radius curve (256 bytes aligned)
	dec ixl   ; radius curve 1 & 2 frame displacement
	inc iyl
	inc iyl
	inc iyl 

.scenario4
	dw angle_curve1			; address of first curve
	inc hl : inc hl : inc hl : inc hl  ; frame displacement of first curve (4 bytes)
	dw angle_curve1.end     ; last address of first curve

	dw angle_curve1         ; address of the second angle curve (256 bytes aligned)
	inc e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve2       ; first radius curve (256 bytes aligned)
	dw radius_curve2       ; second radius curve (256 bytes aligned)
	inc ixl  ; radius curve 1 & 2 frame displacement
	inc iyl 
	inc iyl
	nop : nop



	; the one mainly use during tests
.scenario2
	dw angle_curve2		+ 200	; address of first curve
	nop : nop : nop : nop   ; frame displacement of first curve (4 bytes)
	dw angle_curve2.end     ; last address of first curve

	dw angle_curve2         ; address of the second angle curve (256 bytes aligned)
	dec e : dec e : dec e   ; displacement per frame (3 bytes)

	dw radius_curve1       ; first radius curve (256 bytes aligned)
	dw radius_curve2       ; second radius curve (256 bytes aligned)
	dec ixl   ; radius curve 1 & 2 frame displacement
	inc iyl
	inc iyl
	inc iyl 



.scenario3
	dw angle_curve1			; address of first curve
	nop  : nop : nop : nop   ; frame displacement of first curve (4 bytes)
	dw angle_curve1.end     ; last address of first curve

	dw angle_curve2         ; address of the second angle curve (256 bytes aligned)
	inc e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve1       ; first radius curve (256 bytes aligned)
	dw radius_curve1       ; second radius curve (256 bytes aligned)
	inc ixl   ; radius curve 1 & 2 frame displacement
	inc ixl 
	inc ixl
	dec iyl



.scenario1
	dw angle_curve2.end		- 100	; address of first curve
	inc hl  : inc hl : nop : nop   ; frame displacement of first curve (4 bytes)
	dw angle_curve2.end     ; last address of first curve

	dw angle_curve1         ; address of the second angle curve (256 bytes aligned)
	inc e : inc e : inc e   ; displacement per frame (3 bytes)

	dw radius_curve1       ; first radius curve (256 bytes aligned)
	dw radius_curve1       ; second radius curve (256 bytes aligned)
	inc ixl   ; radius curve 1 & 2 frame displacement
	inc ixl 
	inc ixl
	dec iyl

Full Source

Show Source

	;;
	;  Krusty/Benediction
	; Radial dots tentative
	; 29/09/2024, beginning
	; 29/06/2025, check to add a picture
	;
	; Not yet the demo screen, but some tests to check if it could work

BIENVOIR =  false
	include "inner://ga.asm"

FIRST_BYTE_ADDRESS = 0x800


	bank 0xc4 : range 0x4000, 0x7fff, generated_code_section_0
	bank 0xc5 : range 0x4000, 0x7fff, generated_code_section_1
	bank 0xc6 : range 0x4000, 0x7fff, generated_code_section_2
	bank 0xc7 : range 0x4000, 0x5fff, music_section 
				range 0x6000, 0x7fff, demosystem_section ; TODO see if e can shorten it to increase music space
	
	bank 0xc0 : range 0xc000, 0xffff, standard_screen_section
				range 0x8000, 0xbfff, generated_code_section_3
				range 0x4000, 0x7fff, generated_code_section_4
				range 0x2e00, 0x3fff, generated_code_section_5
				range FIRST_BYTE_ADDRESS, 0x2dff, demo_code_section ; we are here


	section standard_screen_section : assert $ == &c000
	; load the mode 0 and mode 1 screens
	screen0_top = load("screen0_top.scr")
	screen0_bottom = load("screen0_bottom.scr")
	screen1 = load("screen1.scr")
	; fuse them;  pixel content are
	; mutually exclusive in the two screens
	screen = screen0_top | screen0_bottom | screen1
	; store it on screen
	db screen

	section music_section
	include "src/music_akm.asm"

	assert $< 0x6000


	section demo_code_section : assert $ == FIRST_BYTE_ADDRESS


demo_init
	run $



	di
		ld hl, 0xc9fb
		ld (0x38), hl
		ld sp, $
	ei

	ld bc, 0x7f10 : out(c), c : ld bc, 0x7f54 : out (c), c
	ld bc, 0x7f00 : out(c), c : ld bc, 0x7f54 : out (c), c
	ld bc, 0x7f01 : out(c), c : ld bc, 0x7f4b : out (c), c

	;jp polar_screen
	assert $ == polar_screen
demo_init_stop

	;assert demo_init_stop == 0x102C, "Pay attention this value is used for  "
	include "polar.asm"


	macro DEBUG_SECTION_SIZE, name
		print " {name}: [", {hex}section_start("{name}"), "-", {hex}section_stop("{name}"), \
			"] in ", {hex}section_mmr("{name}"), " uses ", {hex}section_used("{name}"), \
			" bytes until ",{hex}(section_start("{name}")+section_used("{name}"))

	endm


	print "===== SUMMARY ====="
	DEBUG_SECTION_SIZE generated_code_section_0
	DEBUG_SECTION_SIZE generated_code_section_1
	DEBUG_SECTION_SIZE generated_code_section_2
	DEBUG_SECTION_SIZE generated_code_section_3
	DEBUG_SECTION_SIZE generated_code_section_4
	DEBUG_SECTION_SIZE generated_code_section_5
	DEBUG_SECTION_SIZE demo_code_section
	DEBUG_SECTION_SIZE music_section



	; XXX It seems there is a bug n BASM that makes it save 16k instead of 
	; the true amount of bytes generated
	; in the meanwhile, we can manually specify size
	macro SAVE_SECTION, name, fname
		section {name}
		save {fname}, section_start("{name}"), section_used("{name}")
	endm

	SAVE_SECTION(generated_code_section_0, "C4.4000")
	SAVE_SECTION(generated_code_section_1, "C5.4000")
	SAVE_SECTION(generated_code_section_2,"C6.4000")
	SAVE_SECTION(music_section,"C7.4000")
	SAVE_SECTION(standard_screen_section, "C0.C000")
	SAVE_SECTION(generated_code_section_3,"C0.8000")
	SAVE_SECTION(generated_code_section_4,"C0.4000")
	SAVE_SECTION(generated_code_section_5,"C0.2E00")
	SAVE_SECTION(demo_code_section,"C0.1000")

Labels

Label: greetings linking/src/greetings.asm:62

Referenced in:

Label: palette_fadeout linking/src/load_outer_space.asm:52

Referenced in:

Label: palette_fadeout.loop linking/src/load_outer_space.asm:54

Label: palette_fadeout.ga_loop linking/src/load_outer_space.asm:61

Label: palette_fadeout.data linking/src/load_outer_space.asm:87

Label: hbl000_fname linking/src/load_outer_space.asm:97

Referenced in:

Label: hbl001_fname linking/src/load_outer_space.asm:100

Referenced in:

Label: makeit_easy_crtc_table linking/src/load_make_it_easy.asm:124

Referenced in:

Label: hbl002_fname linking/src/load_make_it_easy.asm:132

Referenced in:

Label: hbl007_fname linking/src/load_make_it_easy.asm:135

Referenced in:

Label: hbl008_fname linking/src/load_make_it_easy.asm:137

Referenced in:

Label: hbl009_fname linking/src/load_make_it_easy.asm:139

Referenced in:

Label: hbl010_fname linking/src/load_make_it_easy.asm:141

Referenced in:

Label: hbl011_fname linking/src/load_make_it_easy.asm:143

Referenced in:

Label: hbl_selected_fname linking/src/load_make_it_easy.asm:147

Referenced in:

Label: palette_fadeout linking/src/load_make_it_easy.asm:151

Referenced in:

Label: palette_fadeout.loop linking/src/load_make_it_easy.asm:153

Label: palette_fadeout.ga_loop linking/src/load_make_it_easy.asm:160

Label: palette_fadeout.data linking/src/load_make_it_easy.asm:187

Label: start_hbl linking/src/hbl.asm:62

Label: start_hbl.handle_crtc_version linking/src/hbl.asm:66

Label: start_hbl.handle_wrong_crtc_value linking/src/hbl.asm:73

Label: start_hbl.store_crtc_version linking/src/hbl.asm:77

Label: start_hbl.handle_selected_part linking/src/hbl.asm:82

Label: start_hbl.execute_leave_amsdos linking/src/hbl.asm:97

Label: start_hbl.clear_screen1 linking/src/hbl.asm:119

Label: start_hbl.setupcolors linking/src/hbl.asm:123

Label: start_hbl.print_text linking/src/hbl.asm:140

Label: start_hbl.print_crtc_version linking/src/hbl.asm:146

Label: start_hbl.clear_screen2 linking/src/hbl.asm:167

Label: start_hbl.print_greetings linking/src/hbl.asm:171

Label: start_hbl.clear_screen3 linking/src/hbl.asm:175

Label: start_hbl.install_demosystem linking/src/hbl.asm:181

Label: start_hbl.setup_demosystem linking/src/hbl.asm:189

Label: start_hbl.kill_system linking/src/hbl.asm:193

Label: demosystem_data linking/src/hbl.asm:222

Label: demosystem_data.start linking/src/hbl.asm:223

Referenced in:

Label: erazable_memory_zone linking/src/hbl.asm:231

Label: rst_18_params linking/src/hbl.asm:236

Referenced in:

Label: formatted_text1 linking/src/hbl.asm:240

Referenced in:

Label: crtc_table_text linking/src/hbl.asm:255

Referenced in:

Label: crtc0_text linking/src/hbl.asm:269

Referenced in:

Label: crtc1_text linking/src/hbl.asm:270

Referenced in:

Label: crtc2_text linking/src/hbl.asm:271

Referenced in:

Label: crtc3_text linking/src/hbl.asm:272

Referenced in:

Label: crtc4_text linking/src/hbl.asm:273

Referenced in:

Label: formatted_credits linking/src/hbl.asm:276

Referenced in:

Label: crtc_detection linking/src/hbl.asm:310

Referenced in:

Label: intro linking/src/hbl.asm:430

Referenced in:

Label: intro_loader linking/src/hbl.asm:444

Referenced in:

Label: intro_fname linking/src/load_intro.asm:4

Referenced in:
  • linking/src/load_intro.asm:5
    intro_fname_size = $-intro_fname

Label: ds_c1_load_file linking/src/demosystem/private.asm:171

This function MUST be called when being in bootstrap space c1. It restores the firmware, load the file, save the firmware, kill it. Input - HL = filename - DE = address - B = size of the filename C = options of loading Output BC: lenght of the file DE: expected destination of the file
Referenced in:

Label: ds_c1_load_file.copy_filename_size linking/src/demosystem/private.asm:182

Label: ds_c1_load_file.save_load_address linking/src/demosystem/private.asm:186

Label: ds_c1_load_file.copy_filename linking/src/demosystem/private.asm:191

Label: ds_c1_load_file.enter_demosystem_space linking/src/demosystem/private.asm:196

Label: ds_c1_load_file.set_motor_on linking/src/demosystem/private.asm:212

Label: ds_c1_load_file.after_motor_on linking/src/demosystem/private.asm:218

Label: ds_c1_load_file.set_motor_off linking/src/demosystem/private.asm:237

Label: ds_c1_load_file.after_motor_off linking/src/demosystem/private.asm:239

Label: ds_c1_load_file.option linking/src/demosystem/private.asm:252

Label: ds_c1_save_screen_mode linking/src/demosystem/private.asm:257

Referenced in:

Label: ds_c1_copy_from_extra_to_main_over_buffer linking/src/demosystem/private.asm:271

Copy a huge block from extra memory to main memory Restrictions: - source address < &c000 - destination address > &40 - destination address + nb_bytes < &8000 Input: - HL: Adress in extra page - DE: Adress in main page - BC: number of bytes to copy
Referenced in:

Label: ds_c1_copy_from_extra_to_main_over_buffer.handle_current_bloc linking/src/demosystem/private.asm:275

Label: ds_c1_copy_from_extra_to_main_over_buffer.last_bloc_copy linking/src/demosystem/private.asm:291

Label: ds_c1_copy_from_extra_to_main_over_buffer.copy_completed linking/src/demosystem/private.asm:293

Label: ds_c1_copy_from_extra_to_main_over_buffer.needs_an_intermediate_copy linking/src/demosystem/private.asm:297

Label: ds_c1_copy_from_extra_to_main_over_buffer.copy_one_bloc linking/src/demosystem/private.asm:330

Label: ds_c1_backup_firmware linking/src/demosystem/private.asm:365

Backup the original CPC firmware that is in main memory or this system that is in extra memory and used by the demo. As this is stricly the same code, there is nothing to do Interruption have to be cut
Referenced in:

Label: ds_c2_backup_frimware linking/src/demosystem/private.asm:366

Label: ds_c1_make_firmware_quiet linking/src/demosystem/private.asm:409

Referenced in:

Label: ds_c2_make_firmware_quiet linking/src/demosystem/private.asm:410

Label: ds_c2_restore_firmware linking/src/demosystem/private.asm:435

Restore the demosystem in C2 space. Need to be called from the C2 space too. No input is required Interruptions have to be cut here
Referenced in:

Label: ds_c1_wait_secured_vsync linking/src/demosystem/private.asm:492

Label: ds_c2_wait_secured_vsync linking/src/demosystem/private.asm:493

Label: ds_c2_wait_secured_vsync.vsync linking/src/demosystem/private.asm:495

Label: ds_c2_wait_secured_vsync.novsync linking/src/demosystem/private.asm:500

Label: ds_c2_clean_firmware_state linking/src/demosystem/private.asm:506

Referenced in:

Label: ds_c2_load_file_impl linking/src/demosystem/private.asm:550

Referenced in:

Label: ds_c2_load_file_impl.close_error linking/src/demosystem/private.asm:583

Label: ds_c2_load_file_impl.ascii_error linking/src/demosystem/private.asm:586

Label: ds_c2_load_file_impl.open_error linking/src/demosystem/private.asm:589

Label: ds_c2_load_file_impl.load_error linking/src/demosystem/private.asm:592

Label: ds_c2_load_file_impl.error linking/src/demosystem/private.asm:595

Label: ds_c2_load_file_impl.ok linking/src/demosystem/private.asm:604

Label: __ds_screen_mode__ linking/src/demosystem/private.asm:621

Referenced in:

Label: __ds_bootstrap_filename__ linking/src/demosystem/private.asm:629

Referenced in:

Label: polar_loader_fname linking/src/load_outer_space_loader.asm:11

Referenced in:
  • linking/src/load_outer_space_loader.asm:10
    polar_loader_fname_size = $-polar_loader_fname

Label: intro_loader_fname linking/src/load_intro_loader.asm:4

Referenced in:

Label: start linking/src/hbl_000_and_001.asm:10

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:188
    length equ $-start
  • MakeItEasy/src/dsk_multimoderupture8_join.asm:7
    length equ $-start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26

Label: stop linking/src/hbl_000_and_001.asm:12

Label: makeit_loader_fname linking/src/load_make_it_easy_loader.asm:6

Referenced in:

Label: RAINX IntroHBL/src/rain.asm:2

Referenced in:
  • IntroHBL/src/rain.asm:15
    ld hl,RAINX+79
  • IntroHBL/src/rain.asm:22
    ld hl,RAINX
  • IntroHBL/src/rain.asm:39
    ld hl,RAINX+&100              

Label: STORE_POS_RAIN IntroHBL/src/rain.asm:4

Referenced in:

Label: RAIN_CODE IntroHBL/src/rain.asm:5

Referenced in:
  • IntroHBL/src/intro_code.asm:684
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:685
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:686
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:687
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:688
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:689
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:690
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:691
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:692
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:693
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:694
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:695
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:696
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:697
    call RAIN_CODE
  • IntroHBL/src/intro_code.asm:698
    call RAIN_CODE

Label: POS_RAINX IntroHBL/src/rain.asm:16

Referenced in:
  • IntroHBL/src/rain.asm:24
    ld (POS_RAINX+1),hl

Label: NO_LOOP_POSRAINX IntroHBL/src/rain.asm:24

Referenced in:

Label: NB_ITERATION_RAIN IntroHBL/src/rain.asm:36

Label: VARIO_TABLE_RANDOM IntroHBL/src/rain.asm:39

Referenced in:

Label: LOOP_DISPLAY_RAIN IntroHBL/src/rain.asm:60

Referenced in:

Label: SAUVE_SP_RAIN IntroHBL/src/rain.asm:80

Referenced in:

Label: IMPAIR IntroHBL/src/rain.asm:88

Label: PAIR IntroHBL/src/rain.asm:94

Referenced in:
  • IntroHBL/src/rain.asm:79
    jr z,PAIR 

Label: CRTC_3_4_ADAPTATION IntroHBL/src/intro_code.asm:66

Referenced in:

Label: START_AFTER_CRTC_ADAPTATION IntroHBL/src/intro_code.asm:87

Referenced in:

Label: PREPARE_FLASH_SCREENS IntroHBL/src/intro_code.asm:139

Label: SEQUENCE_SPRITES_FLASH IntroHBL/src/intro_code.asm:168

Label: STATIC_FLASH_FRAME_1 IntroHBL/src/intro_code.asm:172

Referenced in:

Label: WAITF1 IntroHBL/src/intro_code.asm:189

Referenced in:
  • IntroHBL/src/intro_code.asm:182
    djnz WAITF1 

Label: STATIC_FLASH_FRAME_2 IntroHBL/src/intro_code.asm:195

Label: WAITF2 IntroHBL/src/intro_code.asm:211

Referenced in:
  • IntroHBL/src/intro_code.asm:206
    djnz WAITF2

Label: POK_MODE IntroHBL/src/intro_code.asm:221

Referenced in:
  • IntroHBL/src/intro_code.asm:237
    ld (POK_MODE+1),a

Label: ALTERNATE_MODE_SPRITE IntroHBL/src/intro_code.asm:224

Label: TIMER_FLASH IntroHBL/src/intro_code.asm:225

Referenced in:

Label: NEXT_SCENARIO_POSITION IntroHBL/src/intro_code.asm:231

Label: POS_TABLE_FLASH IntroHBL/src/intro_code.asm:233

Referenced in:

Label: RESET_SCENARIO IntroHBL/src/intro_code.asm:237

Label: SAME_SCENARIO IntroHBL/src/intro_code.asm:241

Referenced in:

Label: END_SCENARIO IntroHBL/src/intro_code.asm:265

Referenced in:

Label: POK_SPRITE_LEFT IntroHBL/src/intro_code.asm:269

Referenced in:

Label: POS_SPRITE_LEFT IntroHBL/src/intro_code.asm:270

Referenced in:

Label: POK_SPRITE_RIGHT IntroHBL/src/intro_code.asm:274

Referenced in:

Label: POS_SPRITE_RIGHT IntroHBL/src/intro_code.asm:275

Referenced in:

Label: TIMER_SPRITES_FLASH IntroHBL/src/intro_code.asm:279

Referenced in:

Label: PREPARE_MOVING_SRITES IntroHBL/src/intro_code.asm:287

Label: TRANSITION1 IntroHBL/src/intro_code.asm:298

Referenced in:

Label: SCENARIO_TIMER_TRANSITION1 IntroHBL/src/intro_code.asm:310

Referenced in:

Label: NEW_SCENARIO1 IntroHBL/src/intro_code.asm:316

Label: POS_TAB_SCE1 IntroHBL/src/intro_code.asm:317

Referenced in:

Label: PAS_FIN_TAB1 IntroHBL/src/intro_code.asm:323

Referenced in:

Label: LEAVE_SCENARIO_MANAGEMENT_TRANS1 IntroHBL/src/intro_code.asm:337

Referenced in:

Label: ROUTINE_TRANSITION1 IntroHBL/src/intro_code.asm:339

Referenced in:

Label: DISPLAY_B_TRANSITION1 IntroHBL/src/intro_code.asm:344

Referenced in:

Label: SEQUENCE_HBL_MOVING_SPRITES IntroHBL/src/intro_code.asm:357

Referenced in:

Label: MAIN_LOOP IntroHBL/src/intro_code.asm:362

Referenced in:
  • IntroHBL/src/intro_code.asm:430
    jp nz,MAIN_LOOP

Label: MODE_TOP IntroHBL/src/intro_code.asm:375

Referenced in:
  • IntroHBL/src/intro_code.asm:1530
    ld (MODE_TOP+1),a	
  • IntroHBL/src/intro_code.asm:1587
    ld (MODE_TOP+1),a	
  • IntroHBL/src/intro_code.asm:1649
    ld (MODE_TOP+1),a	
  • IntroHBL/src/intro_code.asm:1703
    ld (MODE_TOP+1),a	
  • IntroHBL/src/intro_code.asm:1750
    ld (MODE_TOP+1),a	
  • IntroHBL/src/intro_code.asm:1797
    ld (MODE_TOP+1),a	

Label: POK_RASTER0 IntroHBL/src/intro_code.asm:380

Referenced in:
  • IntroHBL/src/intro_code.asm:1570
    ld (POK_RASTER0+1),hl
  • IntroHBL/src/intro_code.asm:1623
    ld (POK_RASTER0+1),hl
  • IntroHBL/src/intro_code.asm:1688
    ld (POK_RASTER0+1),hl
  • IntroHBL/src/intro_code.asm:1735
    ld (POK_RASTER0+1),hl
  • IntroHBL/src/intro_code.asm:1783
    ld (POK_RASTER0+1),hl
  • IntroHBL/src/intro_code.asm:1835
    ld (POK_RASTER0+1),hl

Label: POK_RASTER0A IntroHBL/src/intro_code.asm:381

Referenced in:

Label: ROUTINE1 IntroHBL/src/intro_code.asm:395

Label: OFFSET_MIDDLE IntroHBL/src/intro_code.asm:397

Label: PART IntroHBL/src/intro_code.asm:415

Referenced in:
  • IntroHBL/src/intro_code.asm:996
    ld (PART+1),de

Label: WAIT3 IntroHBL/src/intro_code.asm:417

Referenced in:
  • IntroHBL/src/intro_code.asm:411
    djnz WAIT3

Label: ROUTINE3 IntroHBL/src/intro_code.asm:421

Label: TIMER_ROTATION IntroHBL/src/intro_code.asm:435

Referenced in:

Label: SEQUENCE_WORDS_DISPLAY IntroHBL/src/intro_code.asm:444

Label: MAIN_WAIT_DISPLAY IntroHBL/src/intro_code.asm:458

Referenced in:

Label: WAIT_WAIT IntroHBL/src/intro_code.asm:476

Referenced in:
  • IntroHBL/src/intro_code.asm:462
    djnz WAIT_WAIT

Label: TIMER_WAIT IntroHBL/src/intro_code.asm:487

Referenced in:
  • IntroHBL/src/intro_code.asm:475
    ld (TIMER_WAIT+1),hl

Label: MAIN_ORNY_DISPLAY IntroHBL/src/intro_code.asm:496

Referenced in:

Label: WAIT1O IntroHBL/src/intro_code.asm:514

Referenced in:
  • IntroHBL/src/intro_code.asm:499
    djnz WAIT1O

Label: TIMER_ORNY IntroHBL/src/intro_code.asm:531

Referenced in:
  • IntroHBL/src/intro_code.asm:514
    ld (TIMER_ORNY+1),hl

Label: MAIN_YTES_DISPLAY IntroHBL/src/intro_code.asm:539

Referenced in:

Label: WAIT1Y IntroHBL/src/intro_code.asm:557

Referenced in:
  • IntroHBL/src/intro_code.asm:538
    djnz WAIT1Y

Label: TIMER_YTES IntroHBL/src/intro_code.asm:574

Referenced in:
  • IntroHBL/src/intro_code.asm:552
    ld (TIMER_YTES+1),hl

Label: MAIN_OVERS_DISPLAY1 IntroHBL/src/intro_code.asm:584

Label: WAIT1OV IntroHBL/src/intro_code.asm:603

Referenced in:
  • IntroHBL/src/intro_code.asm:580
    djnz WAIT1OV

Label: WAIT1OV2 IntroHBL/src/intro_code.asm:618

Referenced in:
  • IntroHBL/src/intro_code.asm:595
    djnz WAIT1OV2

Label: MAIN_OVERS_DISPLAY2 IntroHBL/src/intro_code.asm:636

Referenced in:

Label: WAIT1OV3 IntroHBL/src/intro_code.asm:660

Referenced in:
  • IntroHBL/src/intro_code.asm:631
    djnz WAIT1OV3

Label: TIMER_OVERS IntroHBL/src/intro_code.asm:679

Referenced in:
  • IntroHBL/src/intro_code.asm:648
    ld (TIMER_OVERS+1),hl

Label: SEQUENCE_LOGO_DISPLAY IntroHBL/src/intro_code.asm:688

Label: MAIN_LOGO_DISPLAY_RAIN IntroHBL/src/intro_code.asm:690

Referenced in:

Label: WAIT1 IntroHBL/src/intro_code.asm:708

Referenced in:
  • IntroHBL/src/intro_code.asm:673
    djnz WAIT1

Label: TIMER_LOGO_DISPLAY IntroHBL/src/intro_code.asm:747

Referenced in:

Label: MAIN_ANIMATION_HEART IntroHBL/src/intro_code.asm:770

Referenced in:

Label: WAITH IntroHBL/src/intro_code.asm:791

Referenced in:
  • IntroHBL/src/intro_code.asm:743
    djnz WAITH

Label: ROUTINE_DISPLAY_HEART IntroHBL/src/intro_code.asm:804

Referenced in:

Label: TIMER_ANIMATION_HEART IntroHBL/src/intro_code.asm:810

Referenced in:

Label: DISPLAY_HEART6 IntroHBL/src/intro_code.asm:822

Referenced in:

Label: DISPLAY_HEART5 IntroHBL/src/intro_code.asm:826

Referenced in:

Label: DISPLAY_HEART4 IntroHBL/src/intro_code.asm:830

Referenced in:

Label: DISPLAY_H4 IntroHBL/src/intro_code.asm:832

Label: DISPLAY_H56 IntroHBL/src/intro_code.asm:846

Referenced in:

Label: DISPLAY_HEART3 IntroHBL/src/intro_code.asm:859

Referenced in:

Label: DISPLAY_HEART2 IntroHBL/src/intro_code.asm:863

Referenced in:

Label: DISPLAY_HEART1 IntroHBL/src/intro_code.asm:867

Referenced in:

Label: DISPLAY_H123 IntroHBL/src/intro_code.asm:870

Referenced in:

Label: RASTERS_LOVERS IntroHBL/src/intro_code.asm:882

Referenced in:

Label: SPACEKEY_TEST IntroHBL/src/intro_code.asm:897

Referenced in:

Label: MAIN_HBL_ZONE IntroHBL/src/intro_code.asm:924

Referenced in:

Label: WAIT IntroHBL/src/intro_code.asm:928

Referenced in:
  • IntroHBL/src/intro_code.asm:863
    djnz WAIT 

Label: HIDE_CORRUPTED_BYTE1 IntroHBL/src/intro_code.asm:935

Referenced in:

Label: HIDE_CORRUPTED_BYTE2 IntroHBL/src/intro_code.asm:938

Referenced in:

Label: HIDE_CORRUPTED_BYTE3 IntroHBL/src/intro_code.asm:943

Referenced in:

Label: ROUTINE2 IntroHBL/src/intro_code.asm:946

Referenced in:
  • IntroHBL/src/intro_code.asm:158
    ld (ROUTINE2+1),hl
  • IntroHBL/src/intro_code.asm:343
    ld (ROUTINE2+1),hl
  • IntroHBL/src/intro_code.asm:350
    ld (ROUTINE2+1),hl

Label: MODE_BOTTOM IntroHBL/src/intro_code.asm:949

Referenced in:

Label: pokborder IntroHBL/src/intro_code.asm:952

Referenced in:
  • IntroHBL/src/intro_code.asm:160
    ld (pokborder+1),a
  • IntroHBL/src/intro_code.asm:345
    ld (pokborder+1),a

Label: put_crtc IntroHBL/src/intro_code.asm:959

Referenced in:
  • IntroHBL/src/intro_code.asm:169
    call put_crtc
  • IntroHBL/src/intro_code.asm:191
    call put_crtc
  • IntroHBL/src/intro_code.asm:299
    call put_crtc
  • IntroHBL/src/intro_code.asm:360
    call put_crtc
  • IntroHBL/src/intro_code.asm:447
    call put_crtc
  • IntroHBL/src/intro_code.asm:484
    call put_crtc
  • IntroHBL/src/intro_code.asm:523
    call put_crtc
  • IntroHBL/src/intro_code.asm:565
    call put_crtc
  • IntroHBL/src/intro_code.asm:612
    call put_crtc
  • IntroHBL/src/intro_code.asm:658
    call put_crtc
  • IntroHBL/src/intro_code.asm:728
    call put_crtc
  • IntroHBL/src/intro_code.asm:2935
    call put_crtc

Label: reg_crtc IntroHBL/src/intro_code.asm:961

Referenced in:
  • IntroHBL/src/intro_code.asm:898
    JR	nz,reg_crtc

Label: ini_crtc_main IntroHBL/src/intro_code.asm:970

Label: ini_crtc_load IntroHBL/src/intro_code.asm:971

Referenced in:

Label: ini_crtc_moving IntroHBL/src/intro_code.asm:979

Referenced in:

Label: ini_crtc_flash1 IntroHBL/src/intro_code.asm:987

Referenced in:

Label: ini_crtc_flash2 IntroHBL/src/intro_code.asm:996

Referenced in:
Referenced in:

Label: PLAY_MUSIC_FAP IntroHBL/src/intro_code.asm:1013

Referenced in:

Label: ReturnAddr IntroHBL/src/intro_code.asm:1020

Referenced in:
  • IntroHBL/src/intro_code.asm:106
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8.asm:42
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8_BAK.asm:82
    ld	de, ReturnAddr  

Label: SCENARIO IntroHBL/src/intro_code.asm:1032

Referenced in:
  • IntroHBL/src/intro_code.asm:384
    call SCENARIO

Label: SCENARIO_TIMER IntroHBL/src/intro_code.asm:1034

Referenced in:

Label: NEW_SCENARIO IntroHBL/src/intro_code.asm:1039

Label: POS_TAB_SCE IntroHBL/src/intro_code.asm:1040

Referenced in:
  • IntroHBL/src/intro_code.asm:998
    ld (POS_TAB_SCE+1),hl
  • MakeItEasy/src/manage_scenario.asm:60
    ld (POS_TAB_SCE+1),hl

Label: PAS_FIN_TAB IntroHBL/src/intro_code.asm:1047

Referenced in:

Label: LEAVE_SCENARIO_MANAGEMENT IntroHBL/src/intro_code.asm:1063

Referenced in:

Label: SCENARIO_SPR IntroHBL/src/intro_code.asm:1068

Referenced in:

Label: SCENARIO_SPR_TIMER IntroHBL/src/intro_code.asm:1070

Referenced in:

Label: NEW_SCENARIO_SPR IntroHBL/src/intro_code.asm:1075

Label: POS_TAB_SCE_SPR IntroHBL/src/intro_code.asm:1076

Referenced in:

Label: PAS_FIN_TAB_SPR IntroHBL/src/intro_code.asm:1085

Referenced in:

Label: LEAVE_SCENARIO_SPR_MANAGEMENT IntroHBL/src/intro_code.asm:1099

Referenced in:

Label: generate_line_fullscreen IntroHBL/src/intro_code.asm:1105

Referenced in:

Label: loop IntroHBL/src/intro_code.asm:1113

Referenced in:
  • IntroHBL/src/intro_code.asm:1066
    JR nz,loop 
  • linking/src/demosystem/common.asm:174
    		; Produce a loop only if required

Label: nocarry IntroHBL/src/intro_code.asm:1124

Referenced in:
  • IntroHBL/src/intro_code.asm:1059
    JR nc,nocarry 

Label: generate_line_standart IntroHBL/src/intro_code.asm:1130

Referenced in:

Label: generate_line_standart.loop IntroHBL/src/intro_code.asm:1137

Label: generate_line_standart.nocarry IntroHBL/src/intro_code.asm:1148

Label: HACK_BACK IntroHBL/src/intro_code.asm:1154

Label: GO_HACK IntroHBL/src/intro_code.asm:1186

Referenced in:
  • IntroHBL/src/intro_code.asm:1119
    JP C,GO_HACK

Label: BYTEX IntroHBL/src/intro_code.asm:1195

Referenced in:
  • IntroHBL/src/intro_code.asm:1120
    ld hl,BYTEX+1

Label: LOOP_FILLX IntroHBL/src/intro_code.asm:1197

Referenced in:
  • IntroHBL/src/intro_code.asm:1140
    djnz LOOP_FILLX

Label: STORE_SPX IntroHBL/src/intro_code.asm:1206

Referenced in:
  • IntroHBL/src/intro_code.asm:1127
    ld (STORE_SPX+1),sp

Label: DISPLAY_BACKGROUND1 IntroHBL/src/intro_code.asm:1211

Referenced in:

Label: NB_BGD_LINE1 IntroHBL/src/intro_code.asm:1217

Referenced in:

Label: LOOP_FILL1 IntroHBL/src/intro_code.asm:1218

Referenced in:
  • IntroHBL/src/intro_code.asm:1160
    djnz LOOP_FILL1

Label: STORE_SP1 IntroHBL/src/intro_code.asm:1229

Referenced in:
  • IntroHBL/src/intro_code.asm:1149
    ld (STORE_SP1+1),sp

Label: DISPLAY_BACKGROUND2 IntroHBL/src/intro_code.asm:1233

Referenced in:

Label: POK_SP2 IntroHBL/src/intro_code.asm:1237

Referenced in:
  • IntroHBL/src/intro_code.asm:1162
    ld (POK_SP2+1),sp

Label: LOOP_FILL2 IntroHBL/src/intro_code.asm:1241

Referenced in:
  • IntroHBL/src/intro_code.asm:1185
    djnz LOOP_FILL2

Label: STORE_SP2 IntroHBL/src/intro_code.asm:1251

Referenced in:
  • IntroHBL/src/intro_code.asm:1172
    ld (STORE_SP2+1),sp

Label: DISPLAY_BACKGROUND3 IntroHBL/src/intro_code.asm:1255

Referenced in:

Label: POK_SP3 IntroHBL/src/intro_code.asm:1259

Referenced in:
  • IntroHBL/src/intro_code.asm:1186
    ld (POK_SP3+1),sp

Label: NB_BGD_LINE2 IntroHBL/src/intro_code.asm:1262

Referenced in:

Label: LOOP_FILL3 IntroHBL/src/intro_code.asm:1263

Referenced in:
  • IntroHBL/src/intro_code.asm:1209
    djnz LOOP_FILL3

Label: POK_MIDDLE_LINE1 IntroHBL/src/intro_code.asm:1265

Referenced in:

Label: STORE_SP3 IntroHBL/src/intro_code.asm:1274

Referenced in:
  • IntroHBL/src/intro_code.asm:1194
    ld (STORE_SP3+1),sp

Label: DISPLAY_BACKGROUND4 IntroHBL/src/intro_code.asm:1278

Referenced in:

Label: POK_SP4 IntroHBL/src/intro_code.asm:1282

Referenced in:
  • IntroHBL/src/intro_code.asm:1211
    ld (POK_SP4+1),sp

Label: LOOP_FILL4 IntroHBL/src/intro_code.asm:1285

Referenced in:
  • IntroHBL/src/intro_code.asm:1232
    djnz LOOP_FILL4

Label: STORE_SP4 IntroHBL/src/intro_code.asm:1297

Referenced in:
  • IntroHBL/src/intro_code.asm:1220
    ld (STORE_SP4+1),sp

Label: DISPLAY_BACKGROUND5 IntroHBL/src/intro_code.asm:1301

Referenced in:

Label: POK_SP5 IntroHBL/src/intro_code.asm:1305

Referenced in:
  • IntroHBL/src/intro_code.asm:1234
    ld (POK_SP5+1),sp

Label: NB_BGD_LINE3 IntroHBL/src/intro_code.asm:1307

Referenced in:

Label: LOOP_FILL5 IntroHBL/src/intro_code.asm:1308

Referenced in:
  • IntroHBL/src/intro_code.asm:1258
    djnz LOOP_FILL5

Label: POK_BOTTOM_LINE1 IntroHBL/src/intro_code.asm:1310

Referenced in:

Label: STORE_SP5 IntroHBL/src/intro_code.asm:1319

Referenced in:
  • IntroHBL/src/intro_code.asm:1242
    ld (STORE_SP5+1),sp

Label: DISPLAY_BACKGROUND6 IntroHBL/src/intro_code.asm:1323

Referenced in:

Label: POK_SP6 IntroHBL/src/intro_code.asm:1327

Referenced in:
  • IntroHBL/src/intro_code.asm:1260
    ld (POK_SP6+1),sp

Label: LOOP_FILL6 IntroHBL/src/intro_code.asm:1332

Referenced in:
  • IntroHBL/src/intro_code.asm:1284
    djnz LOOP_FILL6

Label: STORE_SP6 IntroHBL/src/intro_code.asm:1342

Referenced in:
  • IntroHBL/src/intro_code.asm:1269
    ld (STORE_SP6+1),sp

Label: LINE_MODE1_EMPTY_PEN0 IntroHBL/src/intro_code.asm:1348

Referenced in:

Label: LINE_MODE2_PEN1_MODE0_PEN14 IntroHBL/src/intro_code.asm:1349

Referenced in:

Label: LINE_HBL_MODE1 IntroHBL/src/intro_code.asm:1350

Referenced in:

Label: DISPLAY_SPRITE_80BYTES IntroHBL/src/intro_code.asm:1355

Referenced in:

Label: LOOP_SPRITE IntroHBL/src/intro_code.asm:1369

Referenced in:

Label: POSX_SPRITE IntroHBL/src/intro_code.asm:1374

Referenced in:

Label: WIDTH_SPRITE IntroHBL/src/intro_code.asm:1378

Referenced in:

Label: STORE_SPZ IntroHBL/src/intro_code.asm:1384

Referenced in:
  • IntroHBL/src/intro_code.asm:1307
    ld (STORE_SPZ+1),sp

Label: DISPLAY_SPRITE_SHORT IntroHBL/src/intro_code.asm:1389

Referenced in:

Label: DISPLAY_SPRITE IntroHBL/src/intro_code.asm:1402

Referenced in:

Label: SHORT IntroHBL/src/intro_code.asm:1429

Referenced in:
  • IntroHBL/src/intro_code.asm:1342
    jp SHORT

Label: STORE_SP IntroHBL/src/intro_code.asm:1448

Referenced in:
  • IntroHBL/src/intro_code.asm:1337
    ld (STORE_SP+1),sp
  • IntroHBL/src/intro_code.asm:1348
    ld (STORE_SP+1),sp

Label: DISPLAY_MOVING_SPRITE1 IntroHBL/src/intro_code.asm:1453

Referenced in:

Label: MOVE_SPR_H IntroHBL/src/intro_code.asm:1454

Referenced in:
  • IntroHBL/src/intro_code.asm:1369
    ld (MOVE_SPR_H+1),hl
  • IntroHBL/src/intro_code.asm:1642
    ld (MOVE_SPR_H+1),hl

Label: STOP_MOVH IntroHBL/src/intro_code.asm:1455

Referenced in:
  • IntroHBL/src/intro_code.asm:1637
    ld (STOP_MOVH),a

Label: SPRITE1 IntroHBL/src/intro_code.asm:1464

Referenced in:
  • IntroHBL/src/intro_code.asm:1548
    ld (SPRITE1+1),de
  • IntroHBL/src/intro_code.asm:1601
    ld (SPRITE1+1),de
  • IntroHBL/src/intro_code.asm:1666
    ld (SPRITE1+1),hl
  • IntroHBL/src/intro_code.asm:1715
    ld (SPRITE1+1),hl
  • IntroHBL/src/intro_code.asm:1763
    ld (SPRITE1+1),hl
  • IntroHBL/src/intro_code.asm:1815
    ld (SPRITE1+1),hl

Label: SPRITE1_FINAL IntroHBL/src/intro_code.asm:1484

Referenced in:

Label: DISPLAY_MOVING_SPRITE2 IntroHBL/src/intro_code.asm:1489

Referenced in:

Label: MOVE_SPR_L IntroHBL/src/intro_code.asm:1491

Referenced in:
  • IntroHBL/src/intro_code.asm:1406
    ld (MOVE_SPR_L+1),hl
  • IntroHBL/src/intro_code.asm:1644
    ld (MOVE_SPR_L+1),hl

Label: STOP_MOVL IntroHBL/src/intro_code.asm:1492

Referenced in:
  • IntroHBL/src/intro_code.asm:1638
    ld (STOP_MOVL),a

Label: SPRITE2 IntroHBL/src/intro_code.asm:1502

Referenced in:
  • IntroHBL/src/intro_code.asm:1549
    ld (SPRITE2+1),hl
  • IntroHBL/src/intro_code.asm:1602
    ld (SPRITE2+1),hl
  • IntroHBL/src/intro_code.asm:1667
    ld (SPRITE2+1),de
  • IntroHBL/src/intro_code.asm:1716
    ld (SPRITE2+1),de
  • IntroHBL/src/intro_code.asm:1764
    ld (SPRITE2+1),de
  • IntroHBL/src/intro_code.asm:1816
    ld (SPRITE2+1),de

Label: SPRITE2_FINAL IntroHBL/src/intro_code.asm:1520

Referenced in:

Label: TAB_SCENARIO IntroHBL/src/intro_code.asm:1527

Referenced in:

Label: TAB_SCENARIO_LOOP IntroHBL/src/intro_code.asm:1531

Referenced in:

Label: TAB_SCENARIO_SPR IntroHBL/src/intro_code.asm:1576

Referenced in:

Label: TAB_SCENARIO_TRANSITION1 IntroHBL/src/intro_code.asm:1602

Referenced in:

Label: PART1 IntroHBL/src/intro_code.asm:1621

Referenced in:
  • IntroHBL/src/intro_code.asm:1456
    defw PART1

Label: MODE_TOP_1 IntroHBL/src/intro_code.asm:1623

Label: MODE_BOTTOM_1 IntroHBL/src/intro_code.asm:1627

Label: SPR1_1 IntroHBL/src/intro_code.asm:1638

Label: SPR2_1 IntroHBL/src/intro_code.asm:1639

Label: switch_raster2_1 IntroHBL/src/intro_code.asm:1647

Label: switch_pens1_1 IntroHBL/src/intro_code.asm:1649

Label: switch_raster1_1 IntroHBL/src/intro_code.asm:1655

Label: switch_pens2_1 IntroHBL/src/intro_code.asm:1660

Label: POKE2_1 IntroHBL/src/intro_code.asm:1665

Label: PART2 IntroHBL/src/intro_code.asm:1673

Referenced in:
  • IntroHBL/src/intro_code.asm:1459
    defw PART2

Label: MODE_TOP_2 IntroHBL/src/intro_code.asm:1675

Label: MODE_BOTTOM_2 IntroHBL/src/intro_code.asm:1679

Label: SPR1_2 IntroHBL/src/intro_code.asm:1690

Label: SPR2_2 IntroHBL/src/intro_code.asm:1691

Label: switch_raster2_2 IntroHBL/src/intro_code.asm:1699

Label: switch_pens1_2 IntroHBL/src/intro_code.asm:1701

Label: switch_raster1_2 IntroHBL/src/intro_code.asm:1707

Label: switch_pens2_2 IntroHBL/src/intro_code.asm:1710

Label: POKE2_2 IntroHBL/src/intro_code.asm:1715

Label: STATIC_SPRITES2 IntroHBL/src/intro_code.asm:1723

Referenced in:

Label: STATIC_SPRITES IntroHBL/src/intro_code.asm:1730

Referenced in:

Label: PART3 IntroHBL/src/intro_code.asm:1735

Referenced in:
  • IntroHBL/src/intro_code.asm:1446
    defw PART3
  • IntroHBL/src/intro_code.asm:1481
    defw PART3
  • IntroHBL/src/intro_code.asm:1639
    jr PART3

Label: MODE_TOP_3 IntroHBL/src/intro_code.asm:1737

Label: MODE_BOTTOM_3 IntroHBL/src/intro_code.asm:1741

Label: SPR1_3 IntroHBL/src/intro_code.asm:1751

Label: SPR2_3 IntroHBL/src/intro_code.asm:1752

Label: switch_raster2_3 IntroHBL/src/intro_code.asm:1760

Label: switch_pens1_3 IntroHBL/src/intro_code.asm:1762

Label: switch_raster1_3 IntroHBL/src/intro_code.asm:1768

Label: switch_pens2_3 IntroHBL/src/intro_code.asm:1773

Label: POKE2_3 IntroHBL/src/intro_code.asm:1778

Label: PART4 IntroHBL/src/intro_code.asm:1786

Referenced in:
  • IntroHBL/src/intro_code.asm:1449
    defw PART4

Label: MODE_TOP_4 IntroHBL/src/intro_code.asm:1788

Label: MODE_BOTTOM_4 IntroHBL/src/intro_code.asm:1792

Label: SPR1_4 IntroHBL/src/intro_code.asm:1797

Label: SPR2_4 IntroHBL/src/intro_code.asm:1798

Label: switch_raster2_4 IntroHBL/src/intro_code.asm:1806

Label: switch_pens1_4 IntroHBL/src/intro_code.asm:1808

Label: switch_raster1_4 IntroHBL/src/intro_code.asm:1815

Label: switch_pens2_4 IntroHBL/src/intro_code.asm:1818

Label: POKE2_4 IntroHBL/src/intro_code.asm:1823

Label: PART5 IntroHBL/src/intro_code.asm:1830

Referenced in:
  • IntroHBL/src/intro_code.asm:1452
    defw PART5

Label: MODE_TOP_5 IntroHBL/src/intro_code.asm:1832

Label: MODE_BOTTOM_5 IntroHBL/src/intro_code.asm:1836

Label: SPR1_5 IntroHBL/src/intro_code.asm:1841

Label: SPR2_5 IntroHBL/src/intro_code.asm:1842

Label: switch_raster2_5 IntroHBL/src/intro_code.asm:1850

Label: switch_pens1_5 IntroHBL/src/intro_code.asm:1852

Label: switch_raster1_5 IntroHBL/src/intro_code.asm:1859

Label: switch_pens2_5 IntroHBL/src/intro_code.asm:1862

Label: POKE2_5 IntroHBL/src/intro_code.asm:1867

Label: PART6 IntroHBL/src/intro_code.asm:1876

Referenced in:
  • IntroHBL/src/intro_code.asm:1462
    defw PART6

Label: MODE_TOP_6 IntroHBL/src/intro_code.asm:1878

Label: MODE_BOTTOM_6 IntroHBL/src/intro_code.asm:1882

Label: SPR1_6 IntroHBL/src/intro_code.asm:1892

Label: SPR2_6 IntroHBL/src/intro_code.asm:1893

Label: switch_raster2_6 IntroHBL/src/intro_code.asm:1901

Label: switch_pens1_6 IntroHBL/src/intro_code.asm:1903

Label: switch_raster1_6 IntroHBL/src/intro_code.asm:1909

Label: switch_pens2_6 IntroHBL/src/intro_code.asm:1913

Label: POKE2_6 IntroHBL/src/intro_code.asm:1918

Label: COLOR IntroHBL/src/intro_code.asm:1926

Referenced in:
  • IntroHBL/src/intro_code.asm:174
    call COLOR
  • IntroHBL/src/intro_code.asm:196
    call COLOR
  • IntroHBL/src/intro_code.asm:304
    call COLOR
  • IntroHBL/src/intro_code.asm:368
    call COLOR
  • IntroHBL/src/intro_code.asm:465
    call COLOR
  • IntroHBL/src/intro_code.asm:502
    call COLOR
  • IntroHBL/src/intro_code.asm:541
    call COLOR
  • IntroHBL/src/intro_code.asm:583
    call COLOR
  • IntroHBL/src/intro_code.asm:634
    call COLOR
  • IntroHBL/src/intro_code.asm:676
    call COLOR
  • IntroHBL/src/intro_code.asm:746
    call COLOR

Label: BOUCOLOR IntroHBL/src/intro_code.asm:1928

Label: HBL_ZONE_02 IntroHBL/src/intro_code.asm:2015

Referenced in:

Label: POK_M1X IntroHBL/src/intro_code.asm:2026

Referenced in:
  • IntroHBL/src/intro_code.asm:435
    ld (POK_M1X+1),hl

Label: POK_RASTER1X IntroHBL/src/intro_code.asm:2027

Label: POK_RASTER1AX IntroHBL/src/intro_code.asm:2028

Label: POK_M2X IntroHBL/src/intro_code.asm:2033

Referenced in:
  • IntroHBL/src/intro_code.asm:433
    ld (POK_M2X+1),hl

Label: PATCH1X IntroHBL/src/intro_code.asm:2036

Label: PATCH_LOGO1 IntroHBL/src/intro_code.asm:2038

Label: PATCH2X IntroHBL/src/intro_code.asm:2050

Label: HBL_FLASH IntroHBL/src/intro_code.asm:2057

Referenced in:
  • IntroHBL/src/intro_code.asm:2021
    jr nz,HBL_FLASH

Label: POK_OUT_RX IntroHBL/src/intro_code.asm:2107

Label: POK_OUT_LX IntroHBL/src/intro_code.asm:2115

Label: POK_RASTER2X IntroHBL/src/intro_code.asm:2124

Referenced in:

Label: DISPLAY_ORNY IntroHBL/src/intro_code.asm:2153

Referenced in:
Referenced in:

Label: DISPLAY_YTES IntroHBL/src/intro_code.asm:2185

Referenced in:

Label: PATCH IntroHBL/src/intro_code.asm:2204

Referenced in:
Referenced in:

Label: HBL_HORNY1 IntroHBL/src/intro_code.asm:2256

Referenced in:
  • IntroHBL/src/intro_code.asm:2217
    jr nz,HBL_HORNY1

Label: HBL_HORNY2 IntroHBL/src/intro_code.asm:2306

Referenced in:
  • IntroHBL/src/intro_code.asm:2283
    jr nz,HBL_HORNY2

Label: HBL_HORNY3 IntroHBL/src/intro_code.asm:2359

Referenced in:
  • IntroHBL/src/intro_code.asm:2349
    jr nz,HBL_HORNY3

Label: HBL_BYTES IntroHBL/src/intro_code.asm:2425

Referenced in:
  • IntroHBL/src/intro_code.asm:2429
    jr nz,HBL_BYTES	

Label: HBL_BYTES2 IntroHBL/src/intro_code.asm:2484

Referenced in:
  • IntroHBL/src/intro_code.asm:2499
    jr nz,HBL_BYTES2	

Label: HBL_ZONE_012 IntroHBL/src/intro_code.asm:2570

Referenced in:

Label: POK_M1 IntroHBL/src/intro_code.asm:2584

Referenced in:
  • IntroHBL/src/intro_code.asm:1535
    ld (POK_M1+1),a
  • IntroHBL/src/intro_code.asm:1586
    ld (POK_M1+1),a
  • IntroHBL/src/intro_code.asm:1654
    ld (POK_M1+1),a
  • IntroHBL/src/intro_code.asm:1704
    ld (POK_M1+1),a	
  • IntroHBL/src/intro_code.asm:1751
    ld (POK_M1+1),a	
  • IntroHBL/src/intro_code.asm:1802
    ld (POK_M1+1),a

Label: POK_RASTER1 IntroHBL/src/intro_code.asm:2585

Referenced in:
  • IntroHBL/src/intro_code.asm:1559
    ld (POK_RASTER1+1),de
  • IntroHBL/src/intro_code.asm:1612
    ld (POK_RASTER1+1),de
  • IntroHBL/src/intro_code.asm:1677
    ld (POK_RASTER1+1),de
  • IntroHBL/src/intro_code.asm:1726
    ld (POK_RASTER1+1),de
  • IntroHBL/src/intro_code.asm:1774
    ld (POK_RASTER1+1),de
  • IntroHBL/src/intro_code.asm:1826
    ld (POK_RASTER1+1),de

Label: POK_RASTER1A IntroHBL/src/intro_code.asm:2586

Referenced in:

Label: POK_M2 IntroHBL/src/intro_code.asm:2591

Referenced in:
  • IntroHBL/src/intro_code.asm:1531
    ld (POK_M2+1),a	
  • IntroHBL/src/intro_code.asm:1591
    ld (POK_M2+1),a	
  • IntroHBL/src/intro_code.asm:1650
    ld (POK_M2+1),a	
  • IntroHBL/src/intro_code.asm:1708
    ld (POK_M2+1),a
  • IntroHBL/src/intro_code.asm:1755
    ld (POK_M2+1),a
  • IntroHBL/src/intro_code.asm:1798
    ld (POK_M2+1),a	

Label: PATCH1 IntroHBL/src/intro_code.asm:2594

Referenced in:
  • IntroHBL/src/intro_code.asm:1539
    ld (PATCH1+1),a
  • IntroHBL/src/intro_code.asm:1593
    ld (PATCH1+1),a
  • IntroHBL/src/intro_code.asm:1658
    ld (PATCH1+1),a
  • IntroHBL/src/intro_code.asm:1807
    ld (PATCH1+1),a

Label: PATCH2 IntroHBL/src/intro_code.asm:2608

Referenced in:
  • IntroHBL/src/intro_code.asm:1542
    ld (PATCH2+1),a	
  • IntroHBL/src/intro_code.asm:1595
    ld (PATCH2+1),a	
  • IntroHBL/src/intro_code.asm:1661
    ld (PATCH2+1),a	
  • IntroHBL/src/intro_code.asm:1810
    ld (PATCH2+1),a	

Label: HBL_LOOP_012 IntroHBL/src/intro_code.asm:2615

Referenced in:

Label: POK_OUT_R IntroHBL/src/intro_code.asm:2669

Referenced in:
  • IntroHBL/src/intro_code.asm:1578
    ld de,POK_OUT_R+1
  • IntroHBL/src/intro_code.asm:1631
    ld de,POK_OUT_R+1
  • IntroHBL/src/intro_code.asm:1695
    ld de,POK_OUT_R+1
  • IntroHBL/src/intro_code.asm:1742
    ld de,POK_OUT_R+1
  • IntroHBL/src/intro_code.asm:1790
    ld de,POK_OUT_R+1
  • IntroHBL/src/intro_code.asm:1842
    ld de,POK_OUT_R+1

Label: POK_OUT_L IntroHBL/src/intro_code.asm:2677

Referenced in:
  • IntroHBL/src/intro_code.asm:1576
    ld hl,POK_OUT_L+1
  • IntroHBL/src/intro_code.asm:1629
    ld hl,POK_OUT_L+1
  • IntroHBL/src/intro_code.asm:1693
    ld hl,POK_OUT_L+1
  • IntroHBL/src/intro_code.asm:1740
    ld hl,POK_OUT_L+1
  • IntroHBL/src/intro_code.asm:1788
    ld hl,POK_OUT_L+1
  • IntroHBL/src/intro_code.asm:1840
    ld hl,POK_OUT_L+1

Label: POK_RASTER2 IntroHBL/src/intro_code.asm:2686

Referenced in:

Label: TCOL_MAIN IntroHBL/src/intro_code.asm:2699

Referenced in:
  • IntroHBL/src/intro_code.asm:367
    ld hl,TCOL_MAIN
  • MakeItEasy/src/routine_logozone.asm:86
    ld de,TCOL_MAIN+1
  • MakeItEasy/src/exit.asm:86
    ld hl,TCOL_MAIN

Label: TCOL_FLASH1 IntroHBL/src/intro_code.asm:2711

Referenced in:

Label: TCOL_FLASH2 IntroHBL/src/intro_code.asm:2718

Referenced in:
Referenced in:
  • IntroHBL/src/intro_code.asm:464
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:501
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:540
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:582
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:633
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:675
    ld hl,TCOL_LOGO
  • IntroHBL/src/intro_code.asm:745
    ld hl,TCOL_LOGO

Label: TABLE_FLASHING_MOVES IntroHBL/src/intro_code.asm:2740

Referenced in:

Label: COEUR4 IntroHBL/src/intro_code.asm:2909

Referenced in:
  • IntroHBL/src/intro_code.asm:773
    ld bc,COEUR4

Label: COEUR3 IntroHBL/src/intro_code.asm:2910

Referenced in:
  • IntroHBL/src/intro_code.asm:800
    ld bc,COEUR3

Label: COEUR2 IntroHBL/src/intro_code.asm:2911

Referenced in:
  • IntroHBL/src/intro_code.asm:803
    ld bc,COEUR2

Label: COEUR1 IntroHBL/src/intro_code.asm:2912

Referenced in:
  • IntroHBL/src/intro_code.asm:806
    ld bc,COEUR1

Label: CRTC_TYPE IntroHBL/src/intro_code.asm:2914

Label: EXIT_PART IntroHBL/src/intro_code.asm:2920

Referenced in:
  • IntroHBL/src/intro_code.asm:417
    JP NC,EXIT_PART            		
  • IntroHBL/src/intro_code.asm:420
    jp z, EXIT_PART
  • IntroHBL/src/intro_code.asm:701
    JP NC,EXIT_PART 
  • IntroHBL/src/intro_code.asm:756
    JP NC,EXIT_PART 
  • IntroHBL/src/intro_code.asm:765
    jp EXIT_PART
  • MakeItEasy/src/exit.asm:217
    jr z, EXIT_PART

Label: EXIT_PART.black_loop IntroHBL/src/intro_code.asm:2928

Label: start_loader IntroHBL/src/intro_code.asm:2952

Referenced in:

Label: stop_loader IntroHBL/src/intro_code.asm:2960

Referenced in:

Label: END_CODE IntroHBL/src/intro_code.asm:2966

Referenced in:

Label: c0_800_start IntroHBL/src/intro.asm:6

Referenced in:

Label: TAB_MOVES_B IntroHBL/src/intro.asm:7

Referenced in:
  • IntroHBL/src/intro_code.asm:1402
    ld hl,TAB_MOVES_B+&200 
  • IntroHBL/src/intro_code.asm:1643
    ld hl,TAB_MOVES_B+&200 

Label: TAB_MOVES_T IntroHBL/src/intro.asm:9

Referenced in:
  • IntroHBL/src/intro_code.asm:1365
    ld hl,TAB_MOVES_T+&200+&ff 
  • IntroHBL/src/intro_code.asm:1641
    ld hl,TAB_MOVES_T+&200+&ff

Label: SPRITE_HL IntroHBL/src/intro.asm:11

Referenced in:

Label: SPRITE_HR IntroHBL/src/intro.asm:14

Referenced in:

Label: SPRITE_LL IntroHBL/src/intro.asm:17

Referenced in:

Label: SPRITE_LR IntroHBL/src/intro.asm:21

Referenced in:

Label: SPRITE_B IntroHBL/src/intro.asm:25

Referenced in:
  • IntroHBL/src/intro_code.asm:152
    ld bc,SPRITE_B 
  • IntroHBL/src/intro_code.asm:339
    ld bc,SPRITE_B
Referenced in:
Referenced in:
Referenced in:

Label: LOVERS IntroHBL/src/intro.asm:34

Label: ORNY IntroHBL/src/intro.asm:36

Referenced in:
  • IntroHBL/src/intro_code.asm:2100
    ld bc,ORNY

Label: YTES IntroHBL/src/intro.asm:37

Referenced in:
  • IntroHBL/src/intro_code.asm:2128
    ld bc,YTES

Label: OVERS IntroHBL/src/intro.asm:38

Referenced in:

Label: COEUR5 IntroHBL/src/intro.asm:40

Referenced in:
  • IntroHBL/src/intro_code.asm:770
    ld bc,COEUR5

Label: COEUR6 IntroHBL/src/intro.asm:41

Referenced in:
  • IntroHBL/src/intro_code.asm:767
    ld bc,COEUR6

Label: c0_800_stop IntroHBL/src/intro.asm:45

Referenced in:

Label: c0_8000_start IntroHBL/src/intro.asm:53

Referenced in:

Label: c4_start IntroHBL/src/intro.asm:63

Referenced in:
  • IntroHBL/src/intro.asm:67
    c4_stop = c4_start + c4_length

Label: c6_start IntroHBL/src/intro.asm:79

Referenced in:

Label: c6_stop IntroHBL/src/intro.asm:81

Referenced in:

Label: FapPlay IntroHBL/src/music.asm:6

Referenced in:

Label: FapData IntroHBL/src/music.asm:8

Referenced in:
  • IntroHBL/src/intro_code.asm:108
    ld	hl, FapData     
  • IntroHBL/src/music.asm:9
    PlayerSize equ FapData - FapPlay
  • MakeItEasy/src/multimoderupture8.asm:44
    ld	hl, FapData     
  • MakeItEasy/src/multimoderupture8_BAK.asm:49
    org	FapData
  • MakeItEasy/src/multimoderupture8_BAK.asm:84
    ld	hl, FapData     
  • MakeItEasy/src/music.asm:15
    org	FapData

Label: FapInit IntroHBL/src/music.asm:16

Referenced in:
  • IntroHBL/src/intro_code.asm:110
    call    FapInit
  • MakeItEasy/src/multimoderupture8.asm:46
    call    FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:45
    org	FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:86
    call    FapInit

Label: loader_start IntroHBL/src/intro_loader.asm:10

Referenced in:

Label: loader_stop IntroHBL/src/intro_loader.asm:16

Referenced in:

Label: show_image IntroHBL/src/intro_loader.asm:18

Referenced in:

Label: palette_fadein IntroHBL/src/intro_loader.asm:68

Label: palette_fadein.loop IntroHBL/src/intro_loader.asm:70

Label: palette_fadein.set_palette IntroHBL/src/intro_loader.asm:103

Referenced in:

Label: palette_fadein.ga_loop IntroHBL/src/intro_loader.asm:105

Label: palette_fadein.data IntroHBL/src/intro_loader.asm:115

Referenced in:

Label: music_data polar_dots/src/music_akm.asm:30

Referenced in:
  • polar_dots/src/music_akm.asm:16
    			ld hl, music_data

Label: angle_curve2 polar_dots/src/curves.asm:2

Referenced in:

Label: angle_curve2.end polar_dots/src/curves.asm:4

Referenced in:

Label: radius_spread polar_dots/src/curves.asm:11

Referenced in:

Label: angle_curve1 polar_dots/src/curves.asm:17

Referenced in:

Label: angle_curve1.end polar_dots/src/curves.asm:19

Referenced in:

Label: empty_curve256 polar_dots/src/curves.asm:22

Referenced in:

Label: empty_curve256.end polar_dots/src/curves.asm:24

Referenced in:

Label: radius_curve1 polar_dots/src/curves.asm:27

Referenced in:

Label: radius_curve3 polar_dots/src/curves.asm:31

Referenced in:

Label: radius_curve2 polar_dots/src/curves.asm:37

Referenced in:

Label: PLY_AKM_Start polar_dots/src/PlayerAkmDevelop.asm:58

Label: PLY_AKM_InitDisarkGenerateExternalLabel polar_dots/src/PlayerAkmDevelop.asm:271

Label: PLY_AKM_Init polar_dots/src/PlayerAkmDevelop.asm:272

Referenced in:

Label: PLY_AKM_InitVars_Loop polar_dots/src/PlayerAkmDevelop.asm:315

Referenced in:

Label: PLY_AKM_InitVars_Start polar_dots/src/PlayerAkmDevelop.asm:432

Referenced in:

Label: PLY_AKM_InitVars_End polar_dots/src/PlayerAkmDevelop.asm:448

Referenced in:

Label: PLY_AKM_PlayDisarkGenerateExternalLabel polar_dots/src/PlayerAkmDevelop.asm:474

Label: PLY_AKM_Play polar_dots/src/PlayerAkmDevelop.asm:475

Referenced in:

Label: PLY_AKM_Linker polar_dots/src/PlayerAkmDevelop.asm:505

Referenced in:

Label: PLY_AKM_LinkerPostPt polar_dots/src/PlayerAkmDevelop.asm:519

Referenced in:

Label: PLY_AKM_LinkerAfterSpeedChange polar_dots/src/PlayerAkmDevelop.asm:575

Referenced in:

Label: PLY_AKM_LinkerUsePreviousHeight polar_dots/src/PlayerAkmDevelop.asm:585

Referenced in:

Label: PLY_AKM_LinkerSetRemainingHeight polar_dots/src/PlayerAkmDevelop.asm:591

Referenced in:

Label: PLY_AKM_ReadLine polar_dots/src/PlayerAkmDevelop.asm:609

Referenced in:

Label: PLY_AKM_TickCounterManaged polar_dots/src/PlayerAkmDevelop.asm:628

Referenced in:

Label: PLY_AKM_SendPsg polar_dots/src/PlayerAkmDevelop.asm:683

Label: PLY_AKM_SendPsgRegister polar_dots/src/PlayerAkmDevelop.asm:698

Label: PLY_AKM_SendPsgRegisterAfterPop polar_dots/src/PlayerAkmDevelop.asm:700

Label: PLY_AKM_SendPsgRegisterEnd polar_dots/src/PlayerAkmDevelop.asm:754

Label: PLY_AKM_CheckTranspositionAndTrack polar_dots/src/PlayerAkmDevelop.asm:776

Referenced in:

Label: PLY_AKM_CheckTranspositionAndTrack_TrackOffset polar_dots/src/PlayerAkmDevelop.asm:810

Referenced in:

Label: PLY_AKM_CheckTranspositionAndTrack_NoNewTrack polar_dots/src/PlayerAkmDevelop.asm:829

Referenced in:

Label: PLY_AKM_ReadTrack polar_dots/src/PlayerAkmDevelop.asm:845

Referenced in:

Label: PLY_AKM_RT_NoEmptyCell polar_dots/src/PlayerAkmDevelop.asm:854

Referenced in:

Label: PLY_AKM_RT_GetDataByte polar_dots/src/PlayerAkmDevelop.asm:858

Label: PLY_AKM_RT_NewEscapeNote polar_dots/src/PlayerAkmDevelop.asm:889

Referenced in:

Label: PLY_AKM_RT_NoteReference polar_dots/src/PlayerAkmDevelop.asm:913

Referenced in:

Label: PLY_AKM_RT_AfterNoteRead polar_dots/src/PlayerAkmDevelop.asm:923

Referenced in:

Label: PLY_AKM_RT_SameEscapeInstrument polar_dots/src/PlayerAkmDevelop.asm:945

Referenced in:

Label: PLY_AKM_RT_SecondaryInstrument polar_dots/src/PlayerAkmDevelop.asm:950

Referenced in:

Label: PLY_AKM_RT_PrimaryInstrument polar_dots/src/PlayerAkmDevelop.asm:959

Referenced in:

Label: PLY_AKM_RT_StoreCurrentInstrument polar_dots/src/PlayerAkmDevelop.asm:967

Referenced in:

Label: PLY_AKM_RT_ReadWaitFlags polar_dots/src/PlayerAkmDevelop.asm:1020

Label: PLY_AKM_RT_SameEscapeWait polar_dots/src/PlayerAkmDevelop.asm:1034

Referenced in:

Label: PLY_AKM_RT_PrimaryWait polar_dots/src/PlayerAkmDevelop.asm:1039

Referenced in:

Label: PLY_AKM_RT_SecondaryWait polar_dots/src/PlayerAkmDevelop.asm:1048

Referenced in:

Label: PLY_AKM_RT_StoreCurrentWait polar_dots/src/PlayerAkmDevelop.asm:1056

Referenced in:

Label: PLY_AKM_PlaySoundStream polar_dots/src/PlayerAkmDevelop.asm:1306

Referenced in:

Label: PLY_AKM_PSS_ReadFirstByte polar_dots/src/PlayerAkmDevelop.asm:1312

Referenced in:

Label: PLY_AKM_PSS_NSNH_NotEndOfSound polar_dots/src/PlayerAkmDevelop.asm:1341

Referenced in:

Label: PLY_AKM_PSS_SoftOrSoftAndHard polar_dots/src/PlayerAkmDevelop.asm:1363

Referenced in:

Label: PLY_AKM_PSS_S_AfterArpAndOrNoise polar_dots/src/PlayerAkmDevelop.asm:1393

Referenced in:

Label: PLY_AKM_PSS_Shared_StoreInstrumentPointer polar_dots/src/PlayerAkmDevelop.asm:1413

Referenced in:

Label: PLY_AKM_PSS_S_SpeedReached polar_dots/src/PlayerAkmDevelop.asm:1421

Referenced in:

Label: PLY_AKM_CalculatePeriodForBaseNote polar_dots/src/PlayerAkmDevelop.asm:1550

Referenced in:

Label: PLY_AKM_FindOctave_Loop polar_dots/src/PlayerAkmDevelop.asm:1568

Referenced in:

Label: PLY_AKM_FindOctave_OctaveShiftLoop polar_dots/src/PlayerAkmDevelop.asm:1587

Referenced in:

Label: PLY_AKM_FindOctave_OctaveShiftLoop_Finished polar_dots/src/PlayerAkmDevelop.asm:1591

Referenced in:

Label: PLY_AKM_FindOctave_Finished polar_dots/src/PlayerAkmDevelop.asm:1595

Referenced in:

Label: PLY_AKM_PeriodTable_End polar_dots/src/PlayerAkmDevelop.asm:2345

Referenced in:

Label: PLY_AKM_End polar_dots/src/PlayerAkmDevelop.asm:2348

Label: polar_install_scenario polar_dots/src/scenario.asm:2

Referenced in:

Label: polar_install_scenario.first_time polar_dots/src/scenario.asm:15

Label: polar_install_scenario.not_first_time polar_dots/src/scenario.asm:18

Label: polar_install_scenario.save_time polar_dots/src/scenario.asm:20

Label: polar_install_scenario.restart polar_dots/src/scenario.asm:25

Label: polar_install_scenario.continue polar_dots/src/scenario.asm:36

Label: polar_scenarios polar_dots/src/scenario.asm:61

Label: polar_scenarios.table polar_dots/src/scenario.asm:63

Referenced in:

Label: polar_scenarios.restart polar_dots/src/scenario.asm:66

Referenced in:

Label: polar_scenarios.scenario8 polar_dots/src/scenario.asm:79

Label: polar_scenarios.scenario7 polar_dots/src/scenario.asm:95

Label: polar_scenarios.scenario6 polar_dots/src/scenario.asm:111

Label: polar_scenarios.scenario5 polar_dots/src/scenario.asm:127

Label: polar_scenarios.scenario4 polar_dots/src/scenario.asm:142

Label: polar_scenarios.scenario2 polar_dots/src/scenario.asm:160

Label: polar_scenarios.scenario3 polar_dots/src/scenario.asm:177

Label: polar_scenarios.scenario1 polar_dots/src/scenario.asm:194

Label: demo_init polar_dots/src/sna.asm:49

Label: demo_init_stop polar_dots/src/sna.asm:66

Label: polar_screen polar_dots/src/polar.asm:478

Referenced in:

Label: polar_screen.prepare polar_dots/src/polar.asm:481

Label: polar_screen.init_music polar_dots/src/polar.asm:515

Label: polar_screen.init polar_dots/src/polar.asm:518

Label: polar_screen.loop polar_dots/src/polar.asm:535

Referenced in:

Label: polar_screen.wait_lines2 polar_dots/src/polar.asm:592

Label: leave_polar_screen polar_dots/src/polar.asm:658

Referenced in:

Label: start_loader polar_dots/src/polar.asm:676

Referenced in:

Label: stop_loader polar_dots/src/polar.asm:680

Referenced in:

Label: CRTC_ADAPTATION polar_dots/src/polar.asm:684

Referenced in:

Label: CRTC_TYPE polar_dots/src/polar.asm:686

Label: CRTC_3_4_ADAPTATION polar_dots/src/polar.asm:695

Referenced in:

Label: START_AFTER_CRTC_ADAPTATION polar_dots/src/polar.asm:735

Referenced in:

Label: polar_screen_select_routines polar_dots/src/polar.asm:739

Referenced in:

Label: polar_screen_select_routines.continue_curve2 polar_dots/src/polar.asm:767

Label: polar_screen_select_routines.loop polar_dots/src/polar.asm:802

Label: polar_screen_select_routines.save_sp_position_for_drawing polar_dots/src/polar.asm:843

Label: polar_screen_draw_or_erase_routines polar_dots/src/polar.asm:857

Referenced in:

Label: polar_screen_draw_or_erase_routines.bootstrap polar_dots/src/polar.asm:861

Label: polar_screen_draw_or_erase_routines.finish polar_dots/src/polar.asm:876

Referenced in:

Label: polar_screen_handle_next_circle_or_end polar_dots/src/polar.asm:885

Label: polar_screen_handle_next_circle_or_end.true_code polar_dots/src/polar.asm:887

Referenced in:

Label: polar_screen_drawing_table1 polar_dots/src/polar.asm:901

Referenced in:

Label: polar_screen_drawing_table1.end polar_dots/src/polar.asm:903

Referenced in:

Label: polar_screen_drawing_table2 polar_dots/src/polar.asm:905

Label: polar_screen_drawing_table2.end polar_dots/src/polar.asm:907

Referenced in:

Label: polar_screen_switch_buffers polar_dots/src/polar.asm:909

Referenced in:

Label: polar_screen_frame_configuration polar_dots/src/polar.asm:921

Label: polar_screen_frame_configuration.table_a polar_dots/src/polar.asm:922

Referenced in:

Label: polar_screen_frame_configuration.table_b polar_dots/src/polar.asm:924

Referenced in:

Label: polar_screen_frame_configuration.next_frame_read polar_dots/src/polar.asm:926

Referenced in:

Label: polar_screen_setup_palette polar_dots/src/polar.asm:932

Referenced in:

Label: polar_screen_setup_palette.skip_pens polar_dots/src/polar.asm:934

Referenced in:

Label: polar_screen_setup_palette.ga_loop polar_dots/src/polar.asm:936

Label: get_circle_table_address polar_dots/src/polar.asm:955

Label: screen_palette_top polar_dots/src/polar.asm:981

Referenced in:

Label: screen_palette_bottom polar_dots/src/polar.asm:997

Referenced in:

Label: multimode_handle_top_corner polar_dots/src/multi_mode.asm:25

Label: ADAP_REG2_TOP1 polar_dots/src/multi_mode.asm:62

Referenced in:

Label: ADAP_REG2_TOP2 polar_dots/src/multi_mode.asm:113

Referenced in:

Label: LOOP_HEIGHT_AT_XPOS14 polar_dots/src/multi_mode.asm:117

Referenced in:

Label: ADAP_REG2_TOP3 polar_dots/src/multi_mode.asm:168

Referenced in:

Label: ADAP_REG2_TOP4 polar_dots/src/multi_mode.asm:218

Referenced in:

Label: ADAP_REG2_TOP5 polar_dots/src/multi_mode.asm:267

Referenced in:

Label: ADAP_REG2_TOP6 polar_dots/src/multi_mode.asm:319

Referenced in:

Label: ADAP_REG2_TOP7 polar_dots/src/multi_mode.asm:370

Referenced in:

Label: ADAP_REG2_TOP8 polar_dots/src/multi_mode.asm:421

Referenced in:

Label: multimode_wait polar_dots/src/multi_mode.asm:525

Referenced in:
  • polar_dots/src/polar.asm:38
    			call multimode_wait.end - ({duration}-MULTIMODE_WAIT_MINIMAL_DURATION)
  • polar_dots/src/polar.asm:41
    ;			call multimode_wait + {duration} - MULTIMODE_WAIT_MINIMAL_DURATION

Label: multimode_wait.end polar_dots/src/multi_mode.asm:527

Referenced in:
  • polar_dots/src/polar.asm:38
    			call multimode_wait.end - ({duration}-MULTIMODE_WAIT_MINIMAL_DURATION)

Label: loader_start polar_dots/src/polar_loader.asm:10

Referenced in:

Label: loader_stop polar_dots/src/polar_loader.asm:16

Referenced in:

Label: show_image polar_dots/src/polar_loader.asm:18

Referenced in:

Label: palette_fadein polar_dots/src/polar_loader.asm:68

Label: palette_fadein.loop polar_dots/src/polar_loader.asm:70

Label: palette_fadein.set_palette polar_dots/src/polar_loader.asm:103

Referenced in:

Label: palette_fadein.ga_loop polar_dots/src/polar_loader.asm:105

Label: palette_fadein.data polar_dots/src/polar_loader.asm:115

Referenced in:

Label: PLY_AKM_Start polar_dots/src/PlayerAkm_basm.asm:49

Label: PLY_AKM_InitDisarkGenerateExternalLabel polar_dots/src/PlayerAkm_basm.asm:248

Label: PLY_AKM_Init polar_dots/src/PlayerAkm_basm.asm:249

Referenced in:

Label: PLY_AKM_InitVars_Loop polar_dots/src/PlayerAkm_basm.asm:292

Referenced in:

Label: PLY_AKM_InitVars_Start polar_dots/src/PlayerAkm_basm.asm:409

Referenced in:

Label: PLY_AKM_InitVars_End polar_dots/src/PlayerAkm_basm.asm:425

Referenced in:

Label: PLY_AKM_PlayDisarkGenerateExternalLabel polar_dots/src/PlayerAkm_basm.asm:451

Label: PLY_AKM_Play polar_dots/src/PlayerAkm_basm.asm:452

Referenced in:

Label: PLY_AKM_Linker polar_dots/src/PlayerAkm_basm.asm:482

Referenced in:

Label: PLY_AKM_LinkerPostPt polar_dots/src/PlayerAkm_basm.asm:496

Referenced in:

Label: PLY_AKM_LinkerAfterSpeedChange polar_dots/src/PlayerAkm_basm.asm:552

Referenced in:

Label: PLY_AKM_LinkerUsePreviousHeight polar_dots/src/PlayerAkm_basm.asm:562

Referenced in:

Label: PLY_AKM_LinkerSetRemainingHeight polar_dots/src/PlayerAkm_basm.asm:568

Referenced in:

Label: PLY_AKM_ReadLine polar_dots/src/PlayerAkm_basm.asm:586

Referenced in:

Label: PLY_AKM_TickCounterManaged polar_dots/src/PlayerAkm_basm.asm:605

Referenced in:

Label: PLY_AKM_SendPsg polar_dots/src/PlayerAkm_basm.asm:660

Label: PLY_AKM_SendPsgRegister polar_dots/src/PlayerAkm_basm.asm:675

Label: PLY_AKM_SendPsgRegisterAfterPop polar_dots/src/PlayerAkm_basm.asm:677

Label: PLY_AKM_SendPsgRegisterEnd polar_dots/src/PlayerAkm_basm.asm:731

Label: PLY_AKM_CheckTranspositionAndTrack polar_dots/src/PlayerAkm_basm.asm:753

Referenced in:

Label: PLY_AKM_CheckTranspositionAndTrack_TrackOffset polar_dots/src/PlayerAkm_basm.asm:787

Referenced in:

Label: PLY_AKM_CheckTranspositionAndTrack_NoNewTrack polar_dots/src/PlayerAkm_basm.asm:806

Referenced in:

Label: PLY_AKM_ReadTrack polar_dots/src/PlayerAkm_basm.asm:822

Referenced in:

Label: PLY_AKM_RT_NoEmptyCell polar_dots/src/PlayerAkm_basm.asm:831

Referenced in:

Label: PLY_AKM_RT_GetDataByte polar_dots/src/PlayerAkm_basm.asm:835

Label: PLY_AKM_RT_NewEscapeNote polar_dots/src/PlayerAkm_basm.asm:866

Referenced in:

Label: PLY_AKM_RT_NoteReference polar_dots/src/PlayerAkm_basm.asm:890

Referenced in:

Label: PLY_AKM_RT_AfterNoteRead polar_dots/src/PlayerAkm_basm.asm:900

Referenced in:

Label: PLY_AKM_RT_SameEscapeInstrument polar_dots/src/PlayerAkm_basm.asm:922

Referenced in:

Label: PLY_AKM_RT_SecondaryInstrument polar_dots/src/PlayerAkm_basm.asm:927

Referenced in:

Label: PLY_AKM_RT_PrimaryInstrument polar_dots/src/PlayerAkm_basm.asm:936

Referenced in:

Label: PLY_AKM_RT_StoreCurrentInstrument polar_dots/src/PlayerAkm_basm.asm:944

Referenced in:

Label: PLY_AKM_RT_ReadWaitFlags polar_dots/src/PlayerAkm_basm.asm:997

Label: PLY_AKM_RT_SameEscapeWait polar_dots/src/PlayerAkm_basm.asm:1011

Referenced in:

Label: PLY_AKM_RT_PrimaryWait polar_dots/src/PlayerAkm_basm.asm:1016

Referenced in:

Label: PLY_AKM_RT_SecondaryWait polar_dots/src/PlayerAkm_basm.asm:1025

Referenced in:

Label: PLY_AKM_RT_StoreCurrentWait polar_dots/src/PlayerAkm_basm.asm:1033

Referenced in:

Label: PLY_AKM_PlaySoundStream polar_dots/src/PlayerAkm_basm.asm:1283

Referenced in:

Label: PLY_AKM_PSS_ReadFirstByte polar_dots/src/PlayerAkm_basm.asm:1289

Referenced in:

Label: PLY_AKM_PSS_NSNH_NotEndOfSound polar_dots/src/PlayerAkm_basm.asm:1318

Referenced in:

Label: PLY_AKM_PSS_SoftOrSoftAndHard polar_dots/src/PlayerAkm_basm.asm:1340

Referenced in:

Label: PLY_AKM_PSS_S_AfterArpAndOrNoise polar_dots/src/PlayerAkm_basm.asm:1370

Referenced in:

Label: PLY_AKM_PSS_Shared_StoreInstrumentPointer polar_dots/src/PlayerAkm_basm.asm:1390

Referenced in:

Label: PLY_AKM_PSS_S_SpeedReached polar_dots/src/PlayerAkm_basm.asm:1398

Referenced in:

Label: PLY_AKM_CalculatePeriodForBaseNote polar_dots/src/PlayerAkm_basm.asm:1527

Referenced in:

Label: PLY_AKM_FindOctave_Loop polar_dots/src/PlayerAkm_basm.asm:1545

Referenced in:

Label: PLY_AKM_FindOctave_OctaveShiftLoop polar_dots/src/PlayerAkm_basm.asm:1564

Referenced in:

Label: PLY_AKM_FindOctave_OctaveShiftLoop_Finished polar_dots/src/PlayerAkm_basm.asm:1568

Referenced in:

Label: PLY_AKM_FindOctave_Finished polar_dots/src/PlayerAkm_basm.asm:1572

Referenced in:

Label: PLY_AKM_PeriodTable polar_dots/src/PlayerAkm_basm.asm:2301

Referenced in:

Label: PLY_AKM_End polar_dots/src/PlayerAkm_basm.asm:2328

Label: TRANSFERT MakeItEasy/src/transfert_gfx.asm:14

Label: INC_POSITION_TRANSFERT MakeItEasy/src/transfert_gfx.asm:17

Referenced in:

Label: DESTINATION MakeItEasy/src/transfert_gfx.asm:27

Referenced in:
  • MakeItEasy/src/manage_scenario.asm:55
    ld (DESTINATION+1),de

Label: SOURCE MakeItEasy/src/transfert_gfx.asm:32

Referenced in:
  • MakeItEasy/src/manage_scenario.asm:49
    ld (SOURCE+1),de

Label: SOURCE_PAL MakeItEasy/src/palettes.asm:27

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:85
    ld hl,SOURCE_PAL

Label: SET_PAL_0 MakeItEasy/src/palettes.asm:39

Label: SET_PAL_1 MakeItEasy/src/palettes.asm:42

Label: SET_PAL_2 MakeItEasy/src/palettes.asm:46

Label: SET_PAL_3 MakeItEasy/src/palettes.asm:50

Label: SET_PAL_4 MakeItEasy/src/palettes.asm:55

Label: SET_PAL_5 MakeItEasy/src/palettes.asm:57

Label: SET_PAL_6 MakeItEasy/src/palettes.asm:59

Label: SET_PAL_7 MakeItEasy/src/palettes.asm:61

Label: SET_PAL_8 MakeItEasy/src/palettes.asm:63

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1829
    defb SET_PAL_8
  • MakeItEasy/src/scenario_table.asm:1839
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1848
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1855
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1863
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1871
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1881
    defb SET_PAL_8
  • MakeItEasy/src/scenario_table.asm:1888
    defb SET_PAL_8 
  • MakeItEasy/src/scenario_table.asm:1895
    defb SET_PAL_8
  • MakeItEasy/src/scenario_table.asm:1903
    defb SET_PAL_8 

Label: SET_PAL_9 MakeItEasy/src/palettes.asm:65

Label: SET_PAL_10 MakeItEasy/src/palettes.asm:67

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1913
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1922
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1931
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1938
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1946
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1954
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1964
    defb SET_PAL_10 
  • MakeItEasy/src/scenario_table.asm:1971
    defb SET_PAL_10
  • MakeItEasy/src/scenario_table.asm:1978
    defb SET_PAL_10
  • MakeItEasy/src/scenario_table.asm:1986
    defb SET_PAL_10 

Label: SET_PAL_11 MakeItEasy/src/palettes.asm:69

Label: SET_PAL_12 MakeItEasy/src/palettes.asm:71

Label: SET_PAL_13 MakeItEasy/src/palettes.asm:73

Label: SET_PAL_14 MakeItEasy/src/palettes.asm:74

Label: SET_PAL_15 MakeItEasy/src/palettes.asm:77

Label: SET_PAL_16 MakeItEasy/src/palettes.asm:80

Label: SET_PAL_17 MakeItEasy/src/palettes.asm:82

Label: SET_PAL_18 MakeItEasy/src/palettes.asm:84

Label: SET_PAL_19 MakeItEasy/src/palettes.asm:85

Label: SET_PAL_20 MakeItEasy/src/palettes.asm:87

Label: SET_PAL_21 MakeItEasy/src/palettes.asm:92

Label: SET_PAL_22 MakeItEasy/src/palettes.asm:96

Label: MSET_PAL_0 MakeItEasy/src/palettes.asm:106

Label: MSET_PAL_1 MakeItEasy/src/palettes.asm:109

Label: MSET_PAL_2 MakeItEasy/src/palettes.asm:112

Label: MSET_PAL_3 MakeItEasy/src/palettes.asm:115

Label: MSET_PAL_4 MakeItEasy/src/palettes.asm:118

Label: MSET_PAL_5 MakeItEasy/src/palettes.asm:121

Label: MSET_PAL_6 MakeItEasy/src/palettes.asm:123

Label: MSET_PAL_7 MakeItEasy/src/palettes.asm:126

Label: MSET_PAL_8 MakeItEasy/src/palettes.asm:130

Label: MSET_PAL_9 MakeItEasy/src/palettes.asm:132

Label: MSET_PAL_10 MakeItEasy/src/palettes.asm:134

Label: MSET_PAL_11 MakeItEasy/src/palettes.asm:138

Label: MSET_PAL_12 MakeItEasy/src/palettes.asm:141

Label: MSET_PAL_13 MakeItEasy/src/palettes.asm:143

Label: MSET_PAL_14 MakeItEasy/src/palettes.asm:144

Label: MSET_PAL_15 MakeItEasy/src/palettes.asm:148

Label: MSET_PAL_16 MakeItEasy/src/palettes.asm:150

Label: MSET_PAL_17 MakeItEasy/src/palettes.asm:152

Label: MSET_PAL_18 MakeItEasy/src/palettes.asm:154

Label: MSET_PAL_19 MakeItEasy/src/palettes.asm:156

Label: MSET_PAL_20 MakeItEasy/src/palettes.asm:158

Label: MSET_PAL_21 MakeItEasy/src/palettes.asm:162

Label: MSET_PAL_22 MakeItEasy/src/palettes.asm:164

Label: REAL_START MakeItEasy/src/multimoderupture8.asm:19

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:7
    JP REAL_START

Label: MAIN MakeItEasy/src/multimoderupture8.asm:101

Referenced in:
  • MakeItEasy/src/exit.asm:226
    jp MAIN

Label: ReturnAddr MakeItEasy/src/multimoderupture8.asm:122

Referenced in:
  • IntroHBL/src/intro_code.asm:106
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8.asm:42
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8_BAK.asm:82
    ld	de, ReturnAddr  

Label: READ_SINY MakeItEasy/src/multimoderupture8.asm:133

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:129
    ld (READ_SINY+1),hl
  • MakeItEasy/src/multimoderupture8_BAK.asm:157
    ld (READ_SINY+1),hl
Referenced in:

Label: CYCLE MakeItEasy/src/multimoderupture8.asm:164

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:157
    ld (CYCLE+1),a	   
  • MakeItEasy/src/multimoderupture8_BAK.asm:189
    ld (CYCLE+1),a	   

Label: MANAGE_CYCLE MakeItEasy/src/multimoderupture8.asm:165

Referenced in:

Label: MANAGE_VARIO_R5 MakeItEasy/src/multimoderupture8.asm:185

Label: R5_CHANGE MakeItEasy/src/multimoderupture8.asm:187

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:130
    ld (R5_CHANGE+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:162
    ld (R5_CHANGE+1),a

Label: bretard MakeItEasy/src/multimoderupture8.asm:222

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:181
    ld (bretard+1),a
  • MakeItEasy/src/multimoderupture8.asm:187
    ld a,(bretard+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:246
    ld (bretard+1),a

Label: VARIO1 MakeItEasy/src/multimoderupture8.asm:238

Label: LOOP1 MakeItEasy/src/multimoderupture8.asm:240

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:221
    djnz LOOP1
  • MakeItEasy/src/multimoderupture8_BAK.asm:262
    djnz LOOP1

Label: POK_CURVES_TYPE MakeItEasy/src/multimoderupture8.asm:242

Referenced in:

Label: MODES MakeItEasy/src/multimoderupture8.asm:249

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:59
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:82
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:118
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:134
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:157
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:180
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:207
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:229
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:246
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:270
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:294
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:318
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:343
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:423
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:449
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:475
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:494
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:534
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:560
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:588
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:618
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:701
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:726
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:757
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:789
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:819
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:845
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:880
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:905
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:930
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:955
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:980
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1003
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1027
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1059
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1096
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1123
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1150
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1170
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1194
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1218
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1242
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1294
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1319
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1383
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1402
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1421
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1439
    ld (MODES+1),hl
  • MakeItEasy/src/effets_scenario.asm:1458
    ld (MODES+1),hl

Label: COMPENSE_R5_0 MakeItEasy/src/multimoderupture8.asm:254

Label: LONG1 MakeItEasy/src/multimoderupture8.asm:281

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:146
    ld (LONG1+1),a
  • MakeItEasy/src/multimoderupture8.asm:270
    ld bc,(LONG1+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:180
    ld (LONG1+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:314
    ld bc,(LONG1+1)

Label: POK_ZONE_BAS MakeItEasy/src/multimoderupture8.asm:293

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:247
    ld (POK_ZONE_BAS+1),hl
  • MakeItEasy/src/multimoderupture8_BAK.asm:284
    ld (POK_ZONE_BAS+1),hl

Label: LONG2 MakeItEasy/src/multimoderupture8.asm:295

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:142
    ld (LONG2+1),a
  • MakeItEasy/src/multimoderupture8.asm:297
    ld bc,(LONG2+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:176
    ld (LONG2+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:344
    ld bc,(LONG2+1)

Label: LONG_OFFSET1 MakeItEasy/src/multimoderupture8.asm:310

Label: POK_ZONE_BAS_OFF MakeItEasy/src/multimoderupture8.asm:325

Referenced in:

Label: LONG_OFFSET2 MakeItEasy/src/multimoderupture8.asm:335

Label: POK_OFFSET_TOP MakeItEasy/src/multimoderupture8.asm:359

Referenced in:

Label: START_HBL MakeItEasy/src/multimoderupture8.asm:419

Label: TCOL_MAIN MakeItEasy/src/multimoderupture8.asm:444

Referenced in:
  • IntroHBL/src/intro_code.asm:367
    ld hl,TCOL_MAIN
  • MakeItEasy/src/routine_logozone.asm:86
    ld de,TCOL_MAIN+1
  • MakeItEasy/src/exit.asm:86
    ld hl,TCOL_MAIN

Label: POK_CYCLE MakeItEasy/src/multimoderupture8.asm:446

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:166
    ld de,POK_CYCLE
  • MakeItEasy/src/multimoderupture8_BAK.asm:198
    ld de,POK_CYCLE

Label: TAB_CYCLE MakeItEasy/src/multimoderupture8.asm:455

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:163
    ld de,TAB_CYCLE	
  • MakeItEasy/src/multimoderupture8_BAK.asm:195
    ld de,TAB_CYCLE	

Label: TAB_SNOW MakeItEasy/src/multimoderupture8.asm:469

Label: LOGO_ZONE MakeItEasy/src/routine_logozone.asm:17

Referenced in:
  • MakeItEasy/src/sna_multimoderupture8.asm:51
    defw LOGO_ZONE
  • MakeItEasy/src/sna_multimoderupture8.asm:59
    defw LOGO_ZONE	
  • MakeItEasy/src/multimoderupture8_BAK.asm:558
    defw LOGO_ZONE
  • MakeItEasy/src/multimoderupture8_BAK.asm:565
    defw LOGO_ZONE	

Label: TEMPO1 MakeItEasy/src/routine_logozone.asm:20

Label: TRANSFERT_PAL MakeItEasy/src/routine_logozone.asm:97

Referenced in:

Label: RAST1 MakeItEasy/src/routine_logozone.asm:217

Label: TRANSFERT_LOWER_PALETTE MakeItEasy/src/routine_logozone.asm:224

Label: POK_ROUTINE1 MakeItEasy/src/routine_logozone.asm:241

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:256
    ld (POK_ROUTINE1+1),hl
  • MakeItEasy/src/routine_logozone.asm:264
    ld (POK_ROUTINE1+1),hl

Label: RAST2 MakeItEasy/src/routine_logozone.asm:245

Label: TEMPO2 MakeItEasy/src/routine_logozone.asm:251

Label: POK_ROUTINE2 MakeItEasy/src/routine_logozone.asm:271

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:258
    ld (POK_ROUTINE2+1),hl
  • MakeItEasy/src/routine_logozone.asm:266
    ld (POK_ROUTINE2+1),hl

Label: RAST3 MakeItEasy/src/routine_logozone.asm:275

Label: POK_ROUTINE3 MakeItEasy/src/routine_logozone.asm:304

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:260
    ld (POK_ROUTINE3+1),hl
  • MakeItEasy/src/routine_logozone.asm:268
    ld (POK_ROUTINE3+1),hl
Referenced in:

Label: POKE_INK1_INK2 MakeItEasy/src/routine_logozone.asm:312

Referenced in:

Label: STORE_HL MakeItEasy/src/routine_logozone.asm:344

Label: POK_INK3_INK0 MakeItEasy/src/routine_logozone.asm:351

Referenced in:
Referenced in:

Label: INIT_NORMAL_CURVES MakeItEasy/src/routine_logozone.asm:379

Referenced in:

Label: INIT_INTERLACED_CURVES MakeItEasy/src/routine_logozone.asm:387

Referenced in:

Label: CALCUL_TABLE_MOVES_SCROLL_PART1 MakeItEasy/src/routine_logozone.asm:397

Referenced in:

Label: STORE_TAB_MOVE_1 MakeItEasy/src/routine_logozone.asm:407

Referenced in:

Label: EACH_VBL1 MakeItEasy/src/routine_logozone.asm:408

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:53
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:140
    ld (EACH_VBL1+1),a    
  • MakeItEasy/src/effets_scenario.asm:163
    ld (EACH_VBL1+1),a    
  • MakeItEasy/src/effets_scenario.asm:203
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:225
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:421
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:664
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:1056
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:1083
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:1110
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:1137
    ld (EACH_VBL1+1),a
  • MakeItEasy/src/effets_scenario.asm:1267
    ld (EACH_VBL1+1),a

Label: EACH_LINE1 MakeItEasy/src/routine_logozone.asm:412

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:33
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:138
    ld (EACH_LINE1+1),a    
  • MakeItEasy/src/effets_scenario.asm:161
    ld (EACH_LINE1+1),a    
  • MakeItEasy/src/effets_scenario.asm:205
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:227
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:384
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:647
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:666
    ld (EACH_LINE1+1),a
  • MakeItEasy/src/effets_scenario.asm:1054
    ld (EACH_LINE1+1),a   
  • MakeItEasy/src/effets_scenario.asm:1081
    ld (EACH_LINE1+1),a   
  • MakeItEasy/src/effets_scenario.asm:1108
    ld (EACH_LINE1+1),a   
  • MakeItEasy/src/effets_scenario.asm:1135
    ld (EACH_LINE1+1),a   
  • MakeItEasy/src/effets_scenario.asm:1269
    ld (EACH_LINE1+1),a

Label: CALCUL_TABLE_MOVES_SCROLL_PART2 MakeItEasy/src/routine_logozone.asm:465

Referenced in:

Label: CALCUL_TABLE_MOVES_SCROLL_PART3 MakeItEasy/src/routine_logozone.asm:520

Referenced in:

Label: CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART1 MakeItEasy/src/routine_logozone.asm:569

Referenced in:

Label: STORE_TAB_MOVE_I1 MakeItEasy/src/routine_logozone.asm:580

Referenced in:

Label: EACH_VBL_I1 MakeItEasy/src/routine_logozone.asm:581

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:3
    ld (EACH_VBL_I1+1),a
  • MakeItEasy/src/effets_scenario.asm:444
    ld (EACH_VBL_I1+1),a

Label: EACH_LINE_I1 MakeItEasy/src/routine_logozone.asm:585

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:13
    ld (EACH_LINE_I1+1),a
  • MakeItEasy/src/effets_scenario.asm:23
    ld (EACH_LINE_I1+1),a
  • MakeItEasy/src/effets_scenario.asm:442
    ld (EACH_LINE_I1+1),a

Label: CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART2 MakeItEasy/src/routine_logozone.asm:630

Referenced in:

Label: STORE_TAB_MOVE_I2 MakeItEasy/src/routine_logozone.asm:639

Referenced in:

Label: EACH_VBL_I2 MakeItEasy/src/routine_logozone.asm:640

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:396
    ld (EACH_VBL_I2+1),a
  • MakeItEasy/src/effets_scenario.asm:470
    ld (EACH_VBL_I2+1),a

Label: EACH_LINE_I2 MakeItEasy/src/routine_logozone.asm:644

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:469
    ld (EACH_LINE_I2+1),a

Label: CALCUL_TABLE_MOVES_SCROLL_INTERLACED_PART3 MakeItEasy/src/routine_logozone.asm:683

Referenced in:

Label: TAB_SCENARIO MakeItEasy/src/scenario_effets.asm:52

Referenced in:

Label: start MakeItEasy/src/dsk_multimoderupture8_part1.asm:21

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:188
    length equ $-start
  • MakeItEasy/src/dsk_multimoderupture8_join.asm:7
    length equ $-start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26

Label: SAVE_DEMOSYSTEM MakeItEasy/src/dsk_multimoderupture8_part1.asm:82

Label: SAVE_1A0_BYTES MakeItEasy/src/dsk_multimoderupture8_part1.asm:115

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:118
    djnz SAVE_1A0_BYTES

Label: SAVE_SP MakeItEasy/src/dsk_multimoderupture8_part1.asm:128

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:106
    ld (SAVE_SP+1),sp

Label: TABLE_SAVE_DS MakeItEasy/src/dsk_multimoderupture8_part1.asm:166

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:108
    ld sp,TABLE_SAVE_DS

Label: StartMain4000 MakeItEasy/src/dsk_multimoderupture8_part1.asm:184

Label: EndMain4000 MakeItEasy/src/dsk_multimoderupture8_part1.asm:187

Label: main_800 MakeItEasy/src/dsk_multimoderupture8_part1.asm:195

the rest of the file is loaded in a second moment. it is encoded as follows: - dw file length_uncrunched - dw file length_crunched - db file crunched data
Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:50
    ld hl, main_800 + 0
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:61
    ld hl, main_800 + 2

Label: POS6_2 MakeItEasy/src/routine_hbl_positions.asm:12

Referenced in:

Label: BOUCLE_6 MakeItEasy/src/routine_hbl_positions.asm:16

Referenced in:
  • MakeItEasy/src/routine_hbl_positions.asm:92
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:96
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:99
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:103
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:107
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:110
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:114
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:118
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:121
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:125
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:129
    jp BOUCLE_6+3
  • MakeItEasy/src/routine_hbl_positions.asm:133
    jp BOUCLE_6+3

Label: POS7_2 MakeItEasy/src/routine_hbl_positions.asm:95

Referenced in:

Label: POS8_2 MakeItEasy/src/routine_hbl_positions.asm:99

Referenced in:

Label: POS9_2 MakeItEasy/src/routine_hbl_positions.asm:104

Referenced in:

Label: POS10_2 MakeItEasy/src/routine_hbl_positions.asm:110

Referenced in:

Label: POS11_2 MakeItEasy/src/routine_hbl_positions.asm:116

Referenced in:

Label: POS12_2 MakeItEasy/src/routine_hbl_positions.asm:121

Referenced in:

Label: POS13_2 MakeItEasy/src/routine_hbl_positions.asm:127

Referenced in:

Label: POS14_2 MakeItEasy/src/routine_hbl_positions.asm:133

Referenced in:

Label: POS15_2 MakeItEasy/src/routine_hbl_positions.asm:138

Referenced in:

Label: POS16_2 MakeItEasy/src/routine_hbl_positions.asm:144

Referenced in:

Label: POS17_2 MakeItEasy/src/routine_hbl_positions.asm:149

Referenced in:

Label: POS18_2 MakeItEasy/src/routine_hbl_positions.asm:154

Label: POS19_2 MakeItEasy/src/routine_hbl_positions.asm:158

Label: POS20_2 MakeItEasy/src/routine_hbl_positions.asm:162

Label: BOUCLE_20 MakeItEasy/src/routine_hbl_positions.asm:164

Referenced in:
  • MakeItEasy/src/routine_hbl_positions.asm:136
    jp BOUCLE_20+3

Label: POS21_2 MakeItEasy/src/routine_hbl_positions.asm:223

Label: POS22_2 MakeItEasy/src/routine_hbl_positions.asm:227

Label: POS23_2 MakeItEasy/src/routine_hbl_positions.asm:231

Label: POS24_2 MakeItEasy/src/routine_hbl_positions.asm:235

Label: POS25_2 MakeItEasy/src/routine_hbl_positions.asm:239

Label: POS26_2 MakeItEasy/src/routine_hbl_positions.asm:243

Label: POS27_2 MakeItEasy/src/routine_hbl_positions.asm:247

Label: POS28_2 MakeItEasy/src/routine_hbl_positions.asm:251

Label: POS29_2 MakeItEasy/src/routine_hbl_positions.asm:255

Label: POS30_2 MakeItEasy/src/routine_hbl_positions.asm:259

Referenced in:
  • MakeItEasy/src/routine_hbl_positions.asm:181
    jp POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:185
    jp POS30_2+5	
  • MakeItEasy/src/routine_hbl_positions.asm:189
    jp POS30_2+5	
  • MakeItEasy/src/routine_hbl_positions.asm:193
    JP POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:197
    JP POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:201
    JP POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:205
    JP POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:209
    JP POS30_2+5
  • MakeItEasy/src/routine_hbl_positions.asm:213
    JP POS30_2+5

Label: POS31_2 MakeItEasy/src/routine_hbl_positions.asm:315

Label: POS32_2 MakeItEasy/src/routine_hbl_positions.asm:374

Label: POS33_2 MakeItEasy/src/routine_hbl_positions.asm:431

Label: POS34_2 MakeItEasy/src/routine_hbl_positions.asm:489

Label: POS35_2 MakeItEasy/src/routine_hbl_positions.asm:549

Label: POS36_2 MakeItEasy/src/routine_hbl_positions.asm:610

Referenced in:
  • MakeItEasy/src/routine_hbl_positions.asm:436
    JP POS36_2+5

Label: POS37_2 MakeItEasy/src/routine_hbl_positions.asm:672

Label: POS38_2 MakeItEasy/src/routine_hbl_positions.asm:760

Label: BOUCLE MakeItEasy/src/routine_hbl_positions.asm:823

Label: CHANGE_OFFSET MakeItEasy/src/routine_hbl_positions.asm:857

Label: OFFSET MakeItEasy/src/routine_hbl_positions.asm:858

Label: SCENARIO MakeItEasy/src/manage_scenario.asm:6

Referenced in:
  • IntroHBL/src/intro_code.asm:384
    call SCENARIO

Label: SCENARIO_TIMER MakeItEasy/src/manage_scenario.asm:8

Referenced in:

Label: NEW_SCENARIO MakeItEasy/src/manage_scenario.asm:13

Label: POS_TAB_SCE MakeItEasy/src/manage_scenario.asm:15

Referenced in:
  • IntroHBL/src/intro_code.asm:998
    ld (POS_TAB_SCE+1),hl
  • MakeItEasy/src/manage_scenario.asm:60
    ld (POS_TAB_SCE+1),hl

Label: PAS_FIN_TAB MakeItEasy/src/manage_scenario.asm:24

Referenced in:

Label: LEAVE_SCENARIO_MANAGEMENT MakeItEasy/src/manage_scenario.asm:61

Referenced in:

Label: start_800 MakeItEasy/src/sna_multimoderupture8.asm:10

Referenced in:

Label: start_4000 MakeItEasy/src/sna_multimoderupture8.asm:17

Referenced in:

Label: FILE_OFFSET MakeItEasy/src/sna_multimoderupture8.asm:21

Referenced in:

Label: TAB_MOVEX MakeItEasy/src/sna_multimoderupture8.asm:26

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:279
    ld hl,TAB_MOVEX
  • MakeItEasy/src/routine_logozone.asm:342
    ld hl,TAB_MOVEX+56
  • MakeItEasy/src/effets_scenario.asm:95
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:164
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:211
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:233
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:404
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:631
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:648
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:691
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:811
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1086
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1140
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1160
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1208
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1256
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1308
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1333
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1351
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1363
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1375
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1396
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1415
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1433
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1452
    ld a,TAB_MOVEX/256

Label: TAB_MOVEY MakeItEasy/src/sna_multimoderupture8.asm:47

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:123
    ld hl,TAB_MOVEY+&40-5+50
  • MakeItEasy/src/multimoderupture8_BAK.asm:153
    ld hl,TAB_MOVEY

Label: TABLE MakeItEasy/src/sna_multimoderupture8.asm:54

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:267
    ld hl,TABLE+2	 
  • MakeItEasy/src/multimoderupture8.asm:286
    ld hl,TABLE+2
  • MakeItEasy/src/multimoderupture8.asm:318
    ld a,(TABLE+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:311
    ld hl,TABLE

Label: TABLE_OFFSET_FINAL MakeItEasy/src/sna_multimoderupture8.asm:67

Referenced in:

Label: TABLE_RET MakeItEasy/src/sna_multimoderupture8.asm:77

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:238
    ld hl,TABLE_RET
  • MakeItEasy/src/multimoderupture8.asm:255
    ld hl,TABLE_RET+2
  • MakeItEasy/src/multimoderupture8_BAK.asm:276
    ld hl,TABLE_RET

Label: TABLE_RET_FINAL MakeItEasy/src/sna_multimoderupture8.asm:83

Referenced in:

Label: POK_EXIT MakeItEasy/src/sna_multimoderupture8.asm:94

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:185
    ld (POK_EXIT),hl

Label: POK_LOGO_ZONE MakeItEasy/src/sna_multimoderupture8.asm:96

Referenced in:

Label: TABLE_MOVE MakeItEasy/src/sna_multimoderupture8.asm:99

Label: TAB_MOVEXI MakeItEasy/src/sna_multimoderupture8.asm:175

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:324
    ld hl,TAB_MOVEXI+10
  • MakeItEasy/src/effets_scenario.asm:6
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:249
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:273
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:297
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:350
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:391
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:668
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:1113
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:1232
    ld a,TAB_MOVEXI/256
  • MakeItEasy/src/effets_scenario.asm:1284
    ld a,TAB_MOVEXI/256

Label: TAB_MOVEXI2 MakeItEasy/src/sna_multimoderupture8.asm:179

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:16
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:26
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:73
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:108
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:183
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:321
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:379
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:418
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:439
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:466
    ld a,TAB_MOVEXI2/256
  • MakeItEasy/src/effets_scenario.asm:1184
    ld a,TAB_MOVEXI2/256

Label: start_c000 MakeItEasy/src/sna_multimoderupture8.asm:189

Label: start_c6 MakeItEasy/src/sna_multimoderupture8.asm:203

Referenced in:

Label: start_c4 MakeItEasy/src/sna_multimoderupture8.asm:213

Label: BITMAPS MakeItEasy/src/sna_multimoderupture8.asm:214

Referenced in:

Label: start_c5 MakeItEasy/src/sna_multimoderupture8.asm:224

Label: BITMAPS2 MakeItEasy/src/sna_multimoderupture8.asm:225

Label: start_c7 MakeItEasy/src/sna_multimoderupture8.asm:236

Label: BITMAPS3 MakeItEasy/src/sna_multimoderupture8.asm:237

Label: EXIT MakeItEasy/src/exit.asm:5

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:184
    ld hl,EXIT
  • MakeItEasy/src/sna_multimoderupture8.asm:55
    defw EXIT                       
  • MakeItEasy/src/multimoderupture8_BAK.asm:562
    defw EXIT

Label: SAUVESP MakeItEasy/src/exit.asm:8

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:349
    ld (SAUVESP+1),SP
  • MakeItEasy/src/multimoderupture8_BAK.asm:391
    ld (SAUVESP+1),SP

Label: ENDPOS MakeItEasy/src/exit.asm:9

Label: aretard MakeItEasy/src/exit.asm:38

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:177
    ld (aretard+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:241
    ld (aretard+1),a

Label: VARIO2 MakeItEasy/src/exit.asm:85

Label: LOOP2 MakeItEasy/src/exit.asm:87

Referenced in:
  • MakeItEasy/src/exit.asm:75
    djnz LOOP2

Label: EFFET MakeItEasy/src/exit.asm:90

Referenced in:
  • MakeItEasy/src/manage_scenario.asm:42
    ld (EFFET+1),de

Label: COLOR MakeItEasy/src/exit.asm:101

Referenced in:
  • IntroHBL/src/intro_code.asm:174
    call COLOR
  • IntroHBL/src/intro_code.asm:196
    call COLOR
  • IntroHBL/src/intro_code.asm:304
    call COLOR
  • IntroHBL/src/intro_code.asm:368
    call COLOR
  • IntroHBL/src/intro_code.asm:465
    call COLOR
  • IntroHBL/src/intro_code.asm:502
    call COLOR
  • IntroHBL/src/intro_code.asm:541
    call COLOR
  • IntroHBL/src/intro_code.asm:583
    call COLOR
  • IntroHBL/src/intro_code.asm:634
    call COLOR
  • IntroHBL/src/intro_code.asm:676
    call COLOR
  • IntroHBL/src/intro_code.asm:746
    call COLOR

Label: TABCOLOR MakeItEasy/src/exit.asm:105

Label: BOUCOLOR MakeItEasy/src/exit.asm:108

Label: ROUTINE_TRANSFERT MakeItEasy/src/exit.asm:316

Referenced in:

Label: POK_BK_TRANS MakeItEasy/src/exit.asm:317

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:94
    ld (POK_BK_TRANS+1),a 
  • MakeItEasy/src/effets_scenario.asm:416
    ld (POK_BK_TRANS+1),a 
  • MakeItEasy/src/effets_scenario.asm:553
    ld (POK_BK_TRANS+1),a
  • MakeItEasy/src/effets_scenario.asm:1049
    ld (POK_BK_TRANS+1),a
  • MakeItEasy/src/effets_scenario.asm:1359
    ld (POK_BK_TRANS+1),a
  • MakeItEasy/src/effets_scenario.asm:1371
    ld (POK_BK_TRANS+1),a
  • MakeItEasy/src/effets_scenario.asm:1395
    ld (POK_BK_TRANS+1),a 
  • MakeItEasy/src/effets_scenario.asm:1432
    ld (POK_BK_TRANS+1),a 

Label: EXIT_PART MakeItEasy/src/exit.asm:324

Referenced in:
  • IntroHBL/src/intro_code.asm:417
    JP NC,EXIT_PART            		
  • IntroHBL/src/intro_code.asm:420
    jp z, EXIT_PART
  • IntroHBL/src/intro_code.asm:701
    JP NC,EXIT_PART 
  • IntroHBL/src/intro_code.asm:756
    JP NC,EXIT_PART 
  • IntroHBL/src/intro_code.asm:765
    jp EXIT_PART
  • MakeItEasy/src/exit.asm:217
    jr z, EXIT_PART

Label: MAIN2 MakeItEasy/src/exit.asm:333

Label: RESTORE_DEMOSYSTEM MakeItEasy/src/exit.asm:353

Label: RESTORE_1A0_BYTES MakeItEasy/src/exit.asm:382

Referenced in:

Label: SAVE_SP2 MakeItEasy/src/exit.asm:396

Referenced in:
  • MakeItEasy/src/exit.asm:285
    ld (SAVE_SP2+1),sp

Label: TABLE_RESTORE_DS MakeItEasy/src/exit.asm:415

Referenced in:

Label: start_loader MakeItEasy/src/exit.asm:418

Referenced in:

Label: stop_loader MakeItEasy/src/exit.asm:422

Referenced in:

Label: SYNC1 MakeItEasy/src/multimoderupture8_BAK.asm:85

Referenced in:
  • MakeItEasy/src/multimoderupture8_BAK.asm:96
    jr nc,SYNC1

Label: WAIT_VBL1 MakeItEasy/src/multimoderupture8_BAK.asm:88

Label: b14 MakeItEasy/src/multimoderupture8_BAK.asm:94

Referenced in:
  • MakeItEasy/src/multimoderupture8_BAK.asm:103
    djnz b14 	

Label: MAIN MakeItEasy/src/multimoderupture8_BAK.asm:122

Referenced in:
  • MakeItEasy/src/exit.asm:226
    jp MAIN

Label: READ_SINY MakeItEasy/src/multimoderupture8_BAK.asm:150

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:129
    ld (READ_SINY+1),hl
  • MakeItEasy/src/multimoderupture8_BAK.asm:157
    ld (READ_SINY+1),hl
Referenced in:

Label: CYCLE MakeItEasy/src/multimoderupture8_BAK.asm:184

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:157
    ld (CYCLE+1),a	   
  • MakeItEasy/src/multimoderupture8_BAK.asm:189
    ld (CYCLE+1),a	   

Label: MANAGE_CYCLE MakeItEasy/src/multimoderupture8_BAK.asm:185

Referenced in:

Label: ReturnAddr MakeItEasy/src/multimoderupture8_BAK.asm:220

Referenced in:
  • IntroHBL/src/intro_code.asm:106
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8.asm:42
    ld	de, ReturnAddr  
  • MakeItEasy/src/multimoderupture8_BAK.asm:82
    ld	de, ReturnAddr  

Label: MANAGE_VARIO_R5 MakeItEasy/src/multimoderupture8_BAK.asm:229

Label: R5_CHANGE MakeItEasy/src/multimoderupture8_BAK.asm:231

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:130
    ld (R5_CHANGE+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:162
    ld (R5_CHANGE+1),a

Label: bretard MakeItEasy/src/multimoderupture8_BAK.asm:248

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:181
    ld (bretard+1),a
  • MakeItEasy/src/multimoderupture8.asm:187
    ld a,(bretard+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:246
    ld (bretard+1),a

Label: VARIO1 MakeItEasy/src/multimoderupture8_BAK.asm:254

Label: LOOP1 MakeItEasy/src/multimoderupture8_BAK.asm:256

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:221
    djnz LOOP1
  • MakeItEasy/src/multimoderupture8_BAK.asm:262
    djnz LOOP1

Label: COMPENSE_R5_0 MakeItEasy/src/multimoderupture8_BAK.asm:264

Label: LONG1 MakeItEasy/src/multimoderupture8_BAK.asm:276

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:146
    ld (LONG1+1),a
  • MakeItEasy/src/multimoderupture8.asm:270
    ld bc,(LONG1+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:180
    ld (LONG1+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:314
    ld bc,(LONG1+1)

Label: POK_ZONE_BAS MakeItEasy/src/multimoderupture8_BAK.asm:287

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:247
    ld (POK_ZONE_BAS+1),hl
  • MakeItEasy/src/multimoderupture8_BAK.asm:284
    ld (POK_ZONE_BAS+1),hl

Label: LONG2 MakeItEasy/src/multimoderupture8_BAK.asm:288

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:142
    ld (LONG2+1),a
  • MakeItEasy/src/multimoderupture8.asm:297
    ld bc,(LONG2+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:176
    ld (LONG2+1),a
  • MakeItEasy/src/multimoderupture8_BAK.asm:344
    ld bc,(LONG2+1)

Label: LONG_OFFSET1 MakeItEasy/src/multimoderupture8_BAK.asm:310

Label: POK_ZONE_BAS_OFF MakeItEasy/src/multimoderupture8_BAK.asm:342

Referenced in:

Label: LONG_OFFSET2 MakeItEasy/src/multimoderupture8_BAK.asm:344

Label: START_HBL MakeItEasy/src/multimoderupture8_BAK.asm:395

Label: COLOR MakeItEasy/src/multimoderupture8_BAK.asm:443

Referenced in:
  • IntroHBL/src/intro_code.asm:174
    call COLOR
  • IntroHBL/src/intro_code.asm:196
    call COLOR
  • IntroHBL/src/intro_code.asm:304
    call COLOR
  • IntroHBL/src/intro_code.asm:368
    call COLOR
  • IntroHBL/src/intro_code.asm:465
    call COLOR
  • IntroHBL/src/intro_code.asm:502
    call COLOR
  • IntroHBL/src/intro_code.asm:541
    call COLOR
  • IntroHBL/src/intro_code.asm:583
    call COLOR
  • IntroHBL/src/intro_code.asm:634
    call COLOR
  • IntroHBL/src/intro_code.asm:676
    call COLOR
  • IntroHBL/src/intro_code.asm:746
    call COLOR

Label: TABCOLOR MakeItEasy/src/multimoderupture8_BAK.asm:447

Label: BOUCOLOR MakeItEasy/src/multimoderupture8_BAK.asm:450

Label: TCOL_SHADE1 MakeItEasy/src/multimoderupture8_BAK.asm:532

Referenced in:
  • MakeItEasy/src/multimoderupture8_BAK.asm:443
    ld hl,TCOL_SHADE1 

Label: POK_CYCLE MakeItEasy/src/multimoderupture8_BAK.asm:533

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:166
    ld de,POK_CYCLE
  • MakeItEasy/src/multimoderupture8_BAK.asm:198
    ld de,POK_CYCLE

Label: TAB_CYCLE MakeItEasy/src/multimoderupture8_BAK.asm:537

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:163
    ld de,TAB_CYCLE	
  • MakeItEasy/src/multimoderupture8_BAK.asm:195
    ld de,TAB_CYCLE	

Label: TABLE MakeItEasy/src/multimoderupture8_BAK.asm:544

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:267
    ld hl,TABLE+2	 
  • MakeItEasy/src/multimoderupture8.asm:286
    ld hl,TABLE+2
  • MakeItEasy/src/multimoderupture8.asm:318
    ld a,(TABLE+1)
  • MakeItEasy/src/multimoderupture8_BAK.asm:311
    ld hl,TABLE

Label: TABLE_OFFSET_FINAL MakeItEasy/src/multimoderupture8_BAK.asm:557

Referenced in:

Label: TABLE_RET MakeItEasy/src/multimoderupture8_BAK.asm:568

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:238
    ld hl,TABLE_RET
  • MakeItEasy/src/multimoderupture8.asm:255
    ld hl,TABLE_RET+2
  • MakeItEasy/src/multimoderupture8_BAK.asm:276
    ld hl,TABLE_RET

Label: TABLE_RET_FINAL MakeItEasy/src/multimoderupture8_BAK.asm:573

Referenced in:

Label: POK_EXIT MakeItEasy/src/multimoderupture8_BAK.asm:583

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:185
    ld (POK_EXIT),hl

Label: POK_LOGO_ZONE MakeItEasy/src/multimoderupture8_BAK.asm:585

Referenced in:

Label: TABLE_MOVE MakeItEasy/src/multimoderupture8_BAK.asm:588

Label: TABLE_PRECAL_OFFSET MakeItEasy/src/multimoderupture8_BAK.asm:661

Label: TAB_MOVEX MakeItEasy/src/multimoderupture8_BAK.asm:668

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:279
    ld hl,TAB_MOVEX
  • MakeItEasy/src/routine_logozone.asm:342
    ld hl,TAB_MOVEX+56
  • MakeItEasy/src/effets_scenario.asm:95
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:164
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:211
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:233
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:404
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:631
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:648
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:691
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:811
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1086
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1140
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1160
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1208
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1256
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1308
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1333
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1351
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1363
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1375
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1396
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1415
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1433
    ld a,TAB_MOVEX/256
  • MakeItEasy/src/effets_scenario.asm:1452
    ld a,TAB_MOVEX/256

Label: TAB_MOVEY MakeItEasy/src/multimoderupture8_BAK.asm:678

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:123
    ld hl,TAB_MOVEY+&40-5+50
  • MakeItEasy/src/multimoderupture8_BAK.asm:153
    ld hl,TAB_MOVEY

Label: FapInit MakeItEasy/src/music.asm:18

Referenced in:
  • IntroHBL/src/intro_code.asm:110
    call    FapInit
  • MakeItEasy/src/multimoderupture8.asm:46
    call    FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:45
    org	FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:86
    call    FapInit

Label: TAB_SCENARIO MakeItEasy/src/scenario_table.asm:148

Referenced in:

Label: EXTRA1 MakeItEasy/src/scenario_table.asm:199

Label: EXTRA2 MakeItEasy/src/scenario_table.asm:240

Label: TAB_SCENARIO_REAL_START MakeItEasy/src/scenario_table.asm:249

Referenced in:

Label: EXTRA5 MakeItEasy/src/scenario_table.asm:288

Label: EXTRA6 MakeItEasy/src/scenario_table.asm:334

Label: EXTRA3 MakeItEasy/src/scenario_table.asm:376

Label: EXTRA4 MakeItEasy/src/scenario_table.asm:416

Label: EXTRA7 MakeItEasy/src/scenario_table.asm:463

Label: EXTRA8 MakeItEasy/src/scenario_table.asm:500

Label: EXTRA9 MakeItEasy/src/scenario_table.asm:540

Label: EXTRA10 MakeItEasy/src/scenario_table.asm:576

Label: EXTRA11 MakeItEasy/src/scenario_table.asm:616

Label: EXTRA12 MakeItEasy/src/scenario_table.asm:653

Label: EXTRA13 MakeItEasy/src/scenario_table.asm:693

Label: EXTRA14 MakeItEasy/src/scenario_table.asm:729

Label: EXTRA15 MakeItEasy/src/scenario_table.asm:769

Label: EXTRA16 MakeItEasy/src/scenario_table.asm:806

Label: EXTRA17 MakeItEasy/src/scenario_table.asm:846

Label: EXTRA18 MakeItEasy/src/scenario_table.asm:882

Label: EXTRA19 MakeItEasy/src/scenario_table.asm:921

Label: EXTRA20 MakeItEasy/src/scenario_table.asm:956

Label: EXTRA21 MakeItEasy/src/scenario_table.asm:995

Label: EXTRA22 MakeItEasy/src/scenario_table.asm:1033

Label: EXTRA23 MakeItEasy/src/scenario_table.asm:1075

Label: EXTRA24 MakeItEasy/src/scenario_table.asm:1114

Label: EXTRA25 MakeItEasy/src/scenario_table.asm:1154

Label: EXTRA26 MakeItEasy/src/scenario_table.asm:1192

Label: EXTRA27 MakeItEasy/src/scenario_table.asm:1232

Label: EXTRA28 MakeItEasy/src/scenario_table.asm:1270

Label: EXTRA29 MakeItEasy/src/scenario_table.asm:1311

Label: EXTRA30 MakeItEasy/src/scenario_table.asm:1349

Label: EXTRA31 MakeItEasy/src/scenario_table.asm:1389

Label: EXTRA32 MakeItEasy/src/scenario_table.asm:1425

Label: EXTRA33 MakeItEasy/src/scenario_table.asm:1465

Label: EXTRA34 MakeItEasy/src/scenario_table.asm:1501

Label: EXTRA35 MakeItEasy/src/scenario_table.asm:1540

Label: EXTRA36 MakeItEasy/src/scenario_table.asm:1576

Label: EXTRA37 MakeItEasy/src/scenario_table.asm:1617

Label: EXTRA38 MakeItEasy/src/scenario_table.asm:1653

Label: EXTRA39 MakeItEasy/src/scenario_table.asm:1692

Label: EXTRA40 MakeItEasy/src/scenario_table.asm:1731

Label: EXTRA41 MakeItEasy/src/scenario_table.asm:1774

Label: EXTRA42 MakeItEasy/src/scenario_table.asm:1815

Label: EXTRA43 MakeItEasy/src/scenario_table.asm:1855

Label: EXTRA44 MakeItEasy/src/scenario_table.asm:1893

Label: loader_start MakeItEasy/src/loading_screen.asm:13

Referenced in:

Label: loader_stop MakeItEasy/src/loading_screen.asm:19

Referenced in:

Label: show_image MakeItEasy/src/loading_screen.asm:21

Referenced in:

Label: palette_fadein MakeItEasy/src/loading_screen.asm:40

Label: palette_fadein.loop MakeItEasy/src/loading_screen.asm:42

Label: palette_fadein.set_palette MakeItEasy/src/loading_screen.asm:87

Referenced in:

Label: palette_fadein.ga_loop MakeItEasy/src/loading_screen.asm:89

Label: palette_fadein.data MakeItEasy/src/loading_screen.asm:99

Referenced in:

Label: start MakeItEasy/src/dsk_multimoderupture8_join.asm:7

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:188
    length equ $-start
  • MakeItEasy/src/dsk_multimoderupture8_join.asm:7
    length equ $-start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:98
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:133
    		.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:167
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:168
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:169
    			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping are...
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:181
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:182
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:183
    			if {from}.start >= {to}
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:195
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:196
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:217
    		ifdef {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:218
    			assert {from} == {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:299
    		ld hl, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • linking/src/demosystem/linker_common.asm:330
    		ld ix, {from}.start
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26
  • polar_dots/src/polar.asm:53
    ; start at HCC = &26

Label: EFFET_HOTBOLD5 MakeItEasy/src/effets_scenario.asm:1

Label: EFFET_HOTBOLD4 MakeItEasy/src/effets_scenario.asm:12

Label: EFFET_HOTBOLD3 MakeItEasy/src/effets_scenario.asm:24

Label: EFFET_HOTBOLD2 MakeItEasy/src/effets_scenario.asm:35

Referenced in:

Label: EFFET_HOTBOLD MakeItEasy/src/effets_scenario.asm:52

Referenced in:

Label: EFFET_HOTBOLD.GOTO MakeItEasy/src/effets_scenario.asm:64

Referenced in:

Label: EFFET_OLDBITS MakeItEasy/src/effets_scenario.asm:78

Referenced in:

Label: EFFET_OLDBITS.GOTO MakeItEasy/src/effets_scenario.asm:88

Label: EFFET_CYCLINGA MakeItEasy/src/effets_scenario.asm:103

Label: EFFET_SPACE1 MakeItEasy/src/effets_scenario.asm:104

Referenced in:

Label: EFFET_SPACE MakeItEasy/src/effets_scenario.asm:115

Label: EFFET_SPACE.GOTO MakeItEasy/src/effets_scenario.asm:126

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:101
    jr EFFET_SPACE.GOTO

Label: EFFET_STATIC_STILL MakeItEasy/src/effets_scenario.asm:142

Referenced in:

Label: EFFET_STATIC_STILL1 MakeItEasy/src/effets_scenario.asm:170

Referenced in:

Label: EFFET_CYCLING2 MakeItEasy/src/effets_scenario.asm:199

Label: EFFET_CYCLING2.GOTO MakeItEasy/src/effets_scenario.asm:208

Label: EFFET_STATIC1 MakeItEasy/src/effets_scenario.asm:227

Referenced in:

Label: EFFET_STATIC1.GOTO MakeItEasy/src/effets_scenario.asm:239

Label: EFFET_STATIC2 MakeItEasy/src/effets_scenario.asm:250

Referenced in:

Label: EFFET_STATIC2.GOTO MakeItEasy/src/effets_scenario.asm:262

Label: EFFET_30Y MakeItEasy/src/effets_scenario.asm:273

Label: EFFET_30Y.GOTO MakeItEasy/src/effets_scenario.asm:280

Label: EFFET_30Y_DOUBLE MakeItEasy/src/effets_scenario.asm:299

Referenced in:

Label: EFFET_30Y_DOUBLE.GOTO MakeItEasy/src/effets_scenario.asm:306

Label: EFFET_30Y_CROSS MakeItEasy/src/effets_scenario.asm:325

Referenced in:

Label: EFFET_30Y_CROSS.GOTO MakeItEasy/src/effets_scenario.asm:333

Label: EFFET_30Y_CROSS2 MakeItEasy/src/effets_scenario.asm:351

Label: EFFET_30Y_CROSS2.GOTO MakeItEasy/src/effets_scenario.asm:359

Label: EFFET_30Y_CROSS3 MakeItEasy/src/effets_scenario.asm:378

Label: EFFET_30Y_CROSS3.GOTO MakeItEasy/src/effets_scenario.asm:388

Referenced in:

Label: EFFET_30Y_CROSS4 MakeItEasy/src/effets_scenario.asm:409

Label: EFFET_8BITS4 MakeItEasy/src/effets_scenario.asm:425

Label: EFFET_8BITS3INT MakeItEasy/src/effets_scenario.asm:439

Referenced in:

Label: EFFET_8BITS2 MakeItEasy/src/effets_scenario.asm:453

Referenced in:

Label: EFFET_8BITS_SWITCH_C7 MakeItEasy/src/effets_scenario.asm:468

Referenced in:

Label: EFFET_8BITS MakeItEasy/src/effets_scenario.asm:469

Referenced in:
  • MakeItEasy/src/scenario_table.asm:694
    DEFW EFFET_8BITS
  • MakeItEasy/src/scenario_table.asm:703
    DEFW EFFET_8BITS

Label: EFFET_8BITS.GOTO MakeItEasy/src/effets_scenario.asm:481

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:388
    JR EFFET_8BITS.GOTO
  • MakeItEasy/src/effets_scenario.asm:400
    JR EFFET_8BITS.GOTO
  • MakeItEasy/src/effets_scenario.asm:412
    JR EFFET_8BITS.GOTO

Label: EFFET_FINAL MakeItEasy/src/effets_scenario.asm:491

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1914
    DEFW EFFET_FINAL
  • MakeItEasy/src/scenario_table.asm:1955
    DEFW EFFET_FINAL
  • MakeItEasy/src/scenario_table.asm:1965
    DEFW EFFET_FINAL
  • MakeItEasy/src/scenario_table.asm:1972
    DEFW EFFET_FINAL
  • MakeItEasy/src/scenario_table.asm:1979
    DEFW EFFET_FINAL
  • MakeItEasy/src/scenario_table.asm:1987
    DEFW EFFET_FINAL

Label: EFFET_FINAL.GOTO MakeItEasy/src/effets_scenario.asm:504

Label: EFFET_FINAL2 MakeItEasy/src/effets_scenario.asm:523

Referenced in:

Label: EFFET_FINAL2.GOTO MakeItEasy/src/effets_scenario.asm:535

Label: EFFET_START MakeItEasy/src/effets_scenario.asm:556

Label: EFFET_START.GOTO MakeItEasy/src/effets_scenario.asm:564

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:524
    jr EFFET_START.GOTO

Label: EFFET_START1 MakeItEasy/src/effets_scenario.asm:584

Referenced in:

Label: EFFET_EMPTY_BLACK MakeItEasy/src/effets_scenario.asm:594

Referenced in:

Label: EFFET_START_BLACK MakeItEasy/src/effets_scenario.asm:618

Referenced in:

Label: EFFET_START3 MakeItEasy/src/effets_scenario.asm:650

Label: EFFET_START3.GOTO MakeItEasy/src/effets_scenario.asm:657

Label: EFFET_START5 MakeItEasy/src/effets_scenario.asm:681

Referenced in:

Label: EFFET_START5.GOTO MakeItEasy/src/effets_scenario.asm:688

Label: EFFET_START4_BNDCP MakeItEasy/src/effets_scenario.asm:702

Label: EFFET_START4_BNDCP.GOTO MakeItEasy/src/effets_scenario.asm:710

Label: EFFET_START4_BNDCP_MOVES MakeItEasy/src/effets_scenario.asm:717

Referenced in:

Label: EFFET_START4_BNDCP_MOVES.GOTO MakeItEasy/src/effets_scenario.asm:727

Label: EFFET_START4_BNDCP_MOVES2 MakeItEasy/src/effets_scenario.asm:733

Referenced in:

Label: EFFET_START4_BNDCP_MOVES2.GOTO MakeItEasy/src/effets_scenario.asm:748

Label: EFFET_STATIC_WECODE1 MakeItEasy/src/effets_scenario.asm:757

Referenced in:

Label: EFFET_STATIC_WECODE MakeItEasy/src/effets_scenario.asm:761

Referenced in:

Label: EFFET_STATIC_WECODE.GOTO MakeItEasy/src/effets_scenario.asm:765

Referenced in:

Label: EFFET_TESTM2B MakeItEasy/src/effets_scenario.asm:792

Referenced in:

Label: EFFET_TESTM2 MakeItEasy/src/effets_scenario.asm:798

Referenced in:

Label: EFFET_TESTM2.GOTO MakeItEasy/src/effets_scenario.asm:804

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:715
    jr EFFET_TESTM2.GOTO

Label: EFFET_TESTM1M0_B MakeItEasy/src/effets_scenario.asm:824

Referenced in:

Label: EFFET_TESTM1M0 MakeItEasy/src/effets_scenario.asm:829

Referenced in:

Label: EFFET_TESTM1M0.GOTO MakeItEasy/src/effets_scenario.asm:835

Referenced in:

Label: EFFET_TEST2B MakeItEasy/src/effets_scenario.asm:856

Referenced in:

Label: EFFET_TEST2 MakeItEasy/src/effets_scenario.asm:862

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:52
    DEFW EFFET_TEST2
  • MakeItEasy/src/scenario_effets.asm:71
    DEFW EFFET_TEST2
  • MakeItEasy/src/scenario_effets.asm:85
    DEFW EFFET_TEST2
  • MakeItEasy/src/scenario_effets.asm:102
    DEFW EFFET_TEST2
  • MakeItEasy/src/scenario_effets.asm:109
    DEFW EFFET_TEST2

Label: EFFET_TEST2.GOTO MakeItEasy/src/effets_scenario.asm:868

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:778
    jr EFFET_TEST2.GOTO

Label: EFFET_TESTB MakeItEasy/src/effets_scenario.asm:889

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:128
    DEFW EFFET_TESTB
  • MakeItEasy/src/scenario_effets.asm:144
    DEFW EFFET_TESTB
  • MakeItEasy/src/scenario_effets.asm:160
    DEFW EFFET_TESTB

Label: EFFET_TEST MakeItEasy/src/effets_scenario.asm:895

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:119
    DEFW EFFET_TEST
  • MakeItEasy/src/scenario_effets.asm:137
    DEFW EFFET_TEST
  • MakeItEasy/src/scenario_effets.asm:151
    DEFW EFFET_TEST
  • MakeItEasy/src/scenario_effets.asm:167
    DEFW EFFET_TEST 
  • MakeItEasy/src/scenario_effets.asm:174
    DEFW EFFET_TEST

Label: EFFET_TEST.GOTO MakeItEasy/src/effets_scenario.asm:901

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:809
    jr EFFET_TEST.GOTO

Label: EFFET1 MakeItEasy/src/effets_scenario.asm:921

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:315
    DEFW EFFET1
  • MakeItEasy/src/scenario_effets.asm:324
    DEFW EFFET1
  • MakeItEasy/src/scenario_effets.asm:354
    DEFW EFFET1
  • MakeItEasy/src/scenario_effets.asm:361
    DEFW EFFET1
  • MakeItEasy/src/scenario_effets.asm:368
    DEFW EFFET1
  • MakeItEasy/src/scenario_effets.asm:417
    DEFW EFFET1
  • MakeItEasy/src/exit.asm:72
    call EFFET1 

Label: EFFET1.GOTO MakeItEasy/src/effets_scenario.asm:926

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:866
    jr EFFET1.GOTO
  • MakeItEasy/src/effets_scenario.asm:871
    jr EFFET1.GOTO

Label: EFFET1_A MakeItEasy/src/effets_scenario.asm:947

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:331
    DEFW EFFET1_A
  • MakeItEasy/src/scenario_effets.asm:424
    DEFW EFFET1_A

Label: EFFET1_B MakeItEasy/src/effets_scenario.asm:952

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:338
    DEFW EFFET1_B
  • MakeItEasy/src/scenario_effets.asm:345
    DEFW EFFET1_B
  • MakeItEasy/src/scenario_effets.asm:431
    DEFW EFFET1_B

Label: EFFET2 MakeItEasy/src/effets_scenario.asm:957

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:379
    DEFW EFFET2
  • MakeItEasy/src/scenario_effets.asm:388
    DEFW EFFET2
  • MakeItEasy/src/scenario_effets.asm:394
    DEFW EFFET2
  • MakeItEasy/src/scenario_effets.asm:401
    DEFW EFFET2
  • MakeItEasy/src/scenario_effets.asm:408
    DEFW EFFET2

Label: EFFET3 MakeItEasy/src/effets_scenario.asm:981

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:438
    DEFW EFFET3

Label: EFFET3_A MakeItEasy/src/effets_scenario.asm:1006

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:445
    DEFW EFFET3_A

Label: EFFET3_B MakeItEasy/src/effets_scenario.asm:1031

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:452
    DEFW EFFET3_B

Label: EFFET4 MakeItEasy/src/effets_scenario.asm:1060

Label: EFFET5 MakeItEasy/src/effets_scenario.asm:1086

Label: EFFET6 MakeItEasy/src/effets_scenario.asm:1110

Label: EFFET_SWITCH_BANK_C5 MakeItEasy/src/effets_scenario.asm:1135

Referenced in:

Label: EFFET_BND30Y MakeItEasy/src/effets_scenario.asm:1168

Referenced in:

Label: EFFET_BND30Y.GOTO MakeItEasy/src/effets_scenario.asm:1176

Label: EFFET_BND30Y2 MakeItEasy/src/effets_scenario.asm:1197

Referenced in:

Label: EFFET_BND30Y2.GOTO MakeItEasy/src/effets_scenario.asm:1205

Label: EFFET_STILL MakeItEasy/src/effets_scenario.asm:1226

Referenced in:
  • MakeItEasy/src/scenario_table.asm:444
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:454
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:463
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:470
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:478
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:485
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:495
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:502
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:509
    DEFW EFFET_STILL
  • MakeItEasy/src/scenario_table.asm:516
    DEFW EFFET_STILL

Label: EFFET_STILL.GOTO MakeItEasy/src/effets_scenario.asm:1234

Label: EFFET_GREET MakeItEasy/src/effets_scenario.asm:1255

Label: EFFET_GREET.GOTO MakeItEasy/src/effets_scenario.asm:1266

Label: EFFET_WECODE2 MakeItEasy/src/effets_scenario.asm:1282

Label: EFFET_WECODE2.GOTO MakeItEasy/src/effets_scenario.asm:1293

Label: EFFET_WECODE MakeItEasy/src/effets_scenario.asm:1307

Label: EFFET_WECODE.GOTO MakeItEasy/src/effets_scenario.asm:1318

Label: EFFET_GREETR MakeItEasy/src/effets_scenario.asm:1333

Referenced in:

Label: EFFET_GREETR.GOTO MakeItEasy/src/effets_scenario.asm:1344

Label: EFFET_GREETR2 MakeItEasy/src/effets_scenario.asm:1358

Referenced in:

Label: EFFET_GREETR2.GOTO MakeItEasy/src/effets_scenario.asm:1369

Label: EFFET_GREETR3 MakeItEasy/src/effets_scenario.asm:1393

Label: EFFET_GREETR3.GOTO MakeItEasy/src/effets_scenario.asm:1404

Label: EFFET_CREDITS_INT1 MakeItEasy/src/effets_scenario.asm:1419

Referenced in:

Label: EFFET_CREDITS_INT1.GOTO MakeItEasy/src/effets_scenario.asm:1430

Label: EFFET_CREDIT_POL1 MakeItEasy/src/effets_scenario.asm:1444

Referenced in:

Label: EFFET_CREDIT_POL1.GOTO MakeItEasy/src/effets_scenario.asm:1454

Referenced in:

Label: EFFET_CREDIT_POL2_STOP_JUMP MakeItEasy/src/effets_scenario.asm:1464

Referenced in:

Label: EFFET_CREDITS_THISC5 MakeItEasy/src/effets_scenario.asm:1474

Referenced in:

Label: EFFET_CREDITS_THISC4 MakeItEasy/src/effets_scenario.asm:1488

Referenced in:

Label: EFFET_CREDITS_THISC4.GOTO MakeItEasy/src/effets_scenario.asm:1503

Referenced in:

Label: EFFET_STATIC_DESIRE_SWITCH_C7 MakeItEasy/src/effets_scenario.asm:1518

Referenced in:

Label: EFFET_STATIC_DESIRE MakeItEasy/src/effets_scenario.asm:1541

Referenced in:

Label: EFFET_BOEUF_SWITCHC5 MakeItEasy/src/effets_scenario.asm:1564

Referenced in:

Label: EFFET_BOEUF MakeItEasy/src/effets_scenario.asm:1586

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1291
    DEFW EFFET_BOEUF
  • MakeItEasy/src/scenario_table.asm:1301
    DEFW EFFET_BOEUF
  • MakeItEasy/src/scenario_table.asm:1308
    DEFW EFFET_BOEUF
  • MakeItEasy/src/scenario_table.asm:1315
    DEFW EFFET_BOEUF
  • MakeItEasy/src/scenario_table.asm:1323
    DEFW EFFET_BOEUF

Macros

Macro: GREETINGS_NEXT(content) linking/src/greetings.asm:3

Show Source
macro GREETINGS_NEXT content



		GREET_IDX set GREET_IDX +1
        db CHAR_CTRL_PEN
		if GREET_IDX % 2 == 0
			db 2

            if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT
                db {content}
                repeat  40 - string_len({content})
                    db ' '
                endr
            else if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT_CENTERED
                repeat 20
                    db ' '
                endr
                db {content}
                repeat 40-20-string_len({content})
                    db ' '
                endr
            endif
		else
			db 1

            if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT
                repeat 40 - string_len({content})
                    db ' '
                endr
                db {content}
            else if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_LEFT_RIGHT_CENTERED
                repeat 20 - string_len({content})
                    db ' '
                endr
                db {content}
                repeat 20
                    db ' '
                endr
            endif
		endif

        if GREETINGS_TEXT_LAYOUT == GREETINGS_TEXT_CENTERED
            ; just to slow down
            repeat (40-string_len({content}))/2
                db ' '
            endr
            db {content}
            repeat (40-string_len({content}))/2
                db ' '
            endr
        endif

	repeat 40
        db ' '
    endr
    db 10,13
	endm
Referenced in:

Macro: PRINT_FORMATTED_STRING_FROM_HL() linking/src/hbl.asm:56

Request to print a formatted string located at address in HL XXX It seems to not work if some code are 0
Show Source
macro PRINT_FORMATTED_STRING_FROM_HL
	rst #18
	dw rst_18_params
endm
Referenced in:

Macro: DS_PRODUCE_KEYSPACE_ROUTINE() linking/src/demosystem/common.asm:12

Generate the routine to check if the user pressed space
Show Source
macro DS_PRODUCE_KEYSPACE_ROUTINE
    ;;
    ; Check if user pressed space
    ds_keyspace
		DS_KEYSPACE()
		ret

endm

Macro: DS_KEYSPACE() linking/src/demosystem/common.asm:23

Generate the code to check if the user pressed space
Show Source
macro DS_KEYSPACE
        LD	BC,#F40E
        OUT	(C),C
        LD	BC,#F6C0
        OUT	(C),C
;  XOR	A
;  OUT	(C),A
  		defb &ed,&71
        LD	BC,#F792
        OUT	(C),C
        LD	BC,#F645
        OUT	(C),C
        LD	B,#F4
        IN	A,(C)
        LD	BC,#F782
        OUT	(C),C
;  LD	BC,#F600
;  OUT	(C),C
		dec b
		defb &ed,&71
;		
        RLA	
endm
Referenced in:

Macro: DS_PRODUCE_STOP_SOUND_ROUTINE() linking/src/demosystem/common.asm:58

Generate the routine to stop any sound. Direct access to AY is done, not to firmware
Show Source
macro DS_PRODUCE_STOP_SOUND_ROUTINE
; Stop any sound
; based on the AKM player
; only 4 Registers need to be used
	ds_stop_sound
STOP_SOUND
;
 	ld bc,#f680 
        ld a,&c0
	ld de,#f4f6
        out (c),a
; H= PSG register L=value	
	ld hl,&0700+%00111111                ; &07 = Mixer 
	call SendPsgRegister
	ld hl,&0800			    ; &08 = Volume Voice 1
	call SendPsgRegister
	inc h				    ; &09 = Volume Voice 2
	call SendPsgRegister
	inc h			            ; &10 = Volume Voice 3
;	call SendPsgRegister
        

            ;    ld l,%00111111          ;On CPC, bit 6 must be 0. Other platforms don't care.
SendPsgRegister:
    
        ld b,d
        out (c),h       ;#f400 + register.
        ld b,e
        out (c),0       ;#f600
        ld b,d
        out (c),l       ;#f400 + value.
        ld b,e
        out (c),c       ;#f680
        out (c),a       ;#f6c0
;
	ret	

endm
Referenced in:

Macro: DS_PRODUCE_SECURE_WAIT_VSYNC_ROUTINE() linking/src/demosystem/common.asm:107

Generate the routine to wait the beginning of the next VSYNC, ensuring we are not already in VSYNC
Show Source
macro DS_PRODUCE_SECURE_WAIT_VSYNC_ROUTINE
ds_secure_wait_vsync
	DS_SECURE_WAIT_VSYNC()
	ret
endm

Macro: DS_SECURE_WAIT_VSYNC() linking/src/demosystem/common.asm:116

Wait the beginning of the next VSYNC, ensuring we are not already in VSYNC
Show Source
macro DS_SECURE_WAIT_VSYNC
	ld b, 0xf5
@wait_novsync
	in a, (c)
	rra
	jr c, @wait_novsync

@wait_vsync
	in a, (c)
	rra
	jr nc, @wait_vsync
endm
Referenced in:

Macro: DS_PRODUCE_WAIT_VSYNC_ROUTINE() linking/src/demosystem/common.asm:131

Generate the routine to wait the beginning of the next VSYNC
Show Source
macro DS_PRODUCE_WAIT_VSYNC_ROUTINE
ds_wait_vsync
	DS_WAIT_VSYNC()
	ret
endm

Macro: DS_WAIT_VSYNC() linking/src/demosystem/common.asm:139

Wait VSYNC, even if it is already started
Show Source
macro DS_WAIT_VSYNC
	ld b, 0xf5
@wait_vsync
	in a, (c)
	rra
	jr nc, @wait_vsync
endm
Referenced in:

Macro: DS_WAIT_MICROSEG(duration) linking/src/demosystem/common.asm:153

Wait N microseconds (max wait 1021 ms / length 4 - 7 bytes) Initial code from @Syx
Show Source
MACRO DS_WAIT_MICROSEG duration
@k EQU {duration} - 1
		LD   B,@k / 4                      ; (2 = 1 that we subtracted and 1 that is missing from the DJNZ)
		DJNZ $                              ; (4 * [N - 1] + 3 = 4 * N - 1)
		DEFS @k % 4                        ; (1 * [4 * N - 1] % 4)
	ENDM
Referenced in:

Macro: WAIT_CYCLES(cycles) linking/src/demosystem/common.asm:165

Wait a number of CPU cycles (max wait 1024 cycles)
Show Source
MACRO   WAIT_CYCLES cycles
		assert {cycles} <= 1024, 'Too many nops'
		assert {cycles} > 0, 'Wait time must be positive'

		; Compute the number of loops and extra nop
	@loops     equ ({cycles}-1)/4 
	@loopsx4   equ @loops*4
	@nops      equ {cycles}-@loopsx4-1

		; Produce a loop only if required
		if @loops != 0
			ld  b, @loops
	@change_waitLoop
			djnz    @change_waitLoop
		endif

		; Produce extra nops
		defs    @nops, 0

    endm
Referenced in:
  • linking/src/demosystem/common.asm:192
                WAIT_CYCLES {cycles}
  • linking/src/demosystem/common.asm:194
                WAIT_CYCLES 1024

Macro: LONG_WAIT_CYCLES(cycles) linking/src/demosystem/common.asm:189

Macro able to wait more than 1024 nops. Relay on WAIT_CYCLES
Show Source
MACRO LONG_WAIT_CYCLES cycles

        if {cycles} <= 1024
            WAIT_CYCLES {cycles}
        else
            WAIT_CYCLES 1024
            LONG_WAIT_CYCLES {eval}({cycles} - 1024)
        endif
    ENDM

Macro: DS_WRITE_CRTC(register, value) linking/src/demosystem/common.asm:209

WRITE_CRTC: Writes a value to a CRTC register Corrupts: BC XXX we need to keep this slow and long code for crunch and duration purpose
Show Source
MACRO DS_WRITE_CRTC register, value
        LD   BC, &bc00 + {register}
        OUT  (C),C
        LD   BC, &bd00 + {value}
        OUT  (C),C
ENDM
Referenced in:
  • linking/src/demosystem/common.asm:250
    		DS_WRITE_CRTC(0, {eval}63 - @delta)  	; 14 NOPs
  • linking/src/demosystem/common.asm:253
    		DS_WRITE_CRTC(2, {to})         	; 14 NOPs
  • linking/src/demosystem/common.asm:268
    		DS_WRITE_CRTC(4, 38 + {from} - {to})
  • linking/src/demosystem/common.asm:269
    		DS_WRITE_CRTC(7, {to})
  • linking/src/demosystem/common.asm:276
    		DS_WRITE_CRTC(4, 38)
  • linking/src/demosystem/common.asm:287
    		DS_WRITE_CRTC(4, 38 + ({from}) - ({to}))
  • linking/src/demosystem/common.asm:292
    			DS_WRITE_CRTC(7, ({to}))
  • linking/src/demosystem/common.asm:294
    			DS_WRITE_CRTC(7, ({to}))
  • linking/src/demosystem/common.asm:300
    		DS_WRITE_CRTC(4, 38)
  • linking/src/demosystem/common.asm:308
    		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
  • linking/src/demosystem/common.asm:309
    		DS_WRITE_CRTC(7, {vert_to})
  • linking/src/demosystem/common.asm:320
    		DS_WRITE_CRTC(4, 38)
  • linking/src/demosystem/common.asm:327
    		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
  • linking/src/demosystem/common.asm:328
    		DS_WRITE_CRTC(7, {vert_to})
  • linking/src/demosystem/common.asm:338
    		DS_WRITE_CRTC(4, 38)

Macro: DS_CRTC_HORIZONTAL_TRANSITION_ONLY(from, to) linking/src/demosystem/common.asm:245

Il doit être possible de déterminer ce qu'il se passe exactement et d'écrire un cas particulier de la macro si on veut. Music MUST not play under interruption for timing reasons XXX no deeply tested yet
Show Source
MACRO DS_CRTC_HORIZONTAL_TRANSITION_ONLY from, to
@delta EQU ({to}) - ({from})
		DS_WAIT_MICROSEG(__DS_HT_delay1)

		; START OF CRTC TRANSITION, WRITE TEMP R0 ---------------------------------+
		DS_WRITE_CRTC(0, {eval}63 - @delta)  	; 14 NOPs
		DS_WAIT_MICROSEG(64 - 14 - 14)
		xor a                    		; 1 NOP  XXX initial code of Pulko was tagged 1 NOP but using ld a, 0
		DS_WRITE_CRTC(2, {to})         	; 14 NOPs
		DEC B                    		; 13 remaining NOPs of CRTC write
		OUT (C),A
		LD BC, &bd00+63
		; END OF CRTC TRANSITION, RESTORE R0 exactly 64us later -------------------+
		OUT (C), C
	ENDM
Referenced in:

Macro: DS_CRTC_VERTICAL_TRANSITION_ONLY(from, to) linking/src/demosystem/common.asm:266

Vertical CRTC transition from R7=from to R7=to Music MUST not play under interruption for timing reasons XXX no deeply tested yet
Show Source
MACRO DS_CRTC_VERTICAL_TRANSITION_ONLY, from, to
		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {from} - {to})
		DS_WRITE_CRTC(7, {to})
		DS_PLAY_MUSIC()

		HALT
		HALT

		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
		DS_PLAY_MUSIC()
	ENDM

Macro: DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC(from, to) linking/src/demosystem/common.asm:282

Show Source
MACRO DS_CRTC_VERTICAL_TRANSITION_ONLY_NO_MUSIC, from, to
		DS_SECURE_WAIT_VSYNC()

		; Here, C4=({from})

		DS_WRITE_CRTC(4, 38 + ({from}) - ({to}))

		if ({to}) > ({from})
			halt
			halt
			DS_WRITE_CRTC(7, ({to}))
		else
			DS_WRITE_CRTC(7, ({to}))
			HALT
			HALT
		endif

		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
	ENDM
Referenced in:

Macro: DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS(vert_from, vert_to, horiz_from, horiz_to) linking/src/demosystem/common.asm:306

Show Source
MACRO DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS, vert_from, vert_to, horiz_from, horiz_to
		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
		DS_WRITE_CRTC(7, {vert_to})
		DS_PLAY_MUSIC()

		HALT

		DS_HORIZONTAL_TRANSITION_ONLY(horiz_from, horiz_to)

		HALT


		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
		DS_PLAY_MUSIC()
	ENDM

Macro: DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC(vert_from, vert_to, horiz_from, horiz_to) linking/src/demosystem/common.asm:325

Show Source
MACRO DS_CRTC_VERTICAL_AND_HORIZONTAL_TRANSITIONS_NO_MUSIC, vert_from, vert_to, horiz_from, horiz_to
		DS_SECURE_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38 + {vert_from} - {vert_to})
		DS_WRITE_CRTC(7, {vert_to})

		HALT

		DS_CRTC_HORIZONTAL_TRANSITION_ONLY({eval}{horiz_from}, {eval}{horiz_to})

		HALT


		DS_WAIT_VSYNC()
		DS_WRITE_CRTC(4, 38)
	ENDM

Macro: DS_CRTC_DETECTOR() linking/src/demosystem/common.asm:353

Show Source
macro DS_CRTC_DETECTOR

; Source: https://amstradplus.forumactif.com/t22-detecter-son-crtc
; - Last Update : 22/04/2022
;
; On commence en premier lieu par tester si on est sur Amstrad Plus ou pas
;
ld bc,#f782 ; bc=#f782 ; Port B du PPi en entrée
ld e,c      ; e=#82 ; le test est basé sur le bug du ppi
out (c),c   ; de l'Amstrad Plus
dec b       ; b=#f6
ld c,#0f    ; bc=#F60f
out (c),c   ; on envoie une valeur bidon au port #f6 (#0f)
inc  b      ; b=#f7
ld a,e      ; a=#82
out (c),a   ; Port B du PPi en entrée
dec b       ; b=#f6
in a,(c)    ; a=val du port #f6
cp c        ; si la val du port #f6 est égale à #0f
jr z,@crtc3  ; c'est un Amstrad Plus (Crtc 3)
;
; On est pas sur Amstrad Plus
; Les tests crtc 4 et 0 sont basés sur la lecture du poids fort
; du reg12 du crtc
;
ld e,#30 ; on positionne le poids fort de la vRam en #30 (#cxxx)
ld bc,#bc0c
out (c),c ; selection du r12
inc b
out (c),e ; envoie de la valeur au port 12 du crtc
;
; Est-ce un Amstrad Cpc Crtc 4 ?
; On lit le port #be
; Si le résultat obtenu est égal à la valeur de e (vRam)
; Alors c'est un Amstrad Cpc Crtc 4
;
ld b,#be ; detection crtc 4
in a,(c)
cp e ; e=poids fort vRam
jr z,@crtc4
;
; Si ce n'est pas un Amstrad Cpc Crtc 4
; Est ce un Amstrad Cpc Crtc 0 ?
; Pour cela on utilise le port #bf du Crtc
; Si le résultat obtenu est égal à la valeur de e (vRam)
; alors c'est un Amsttrad Cpc Crtc 0
;
ld b,#bf ; detection crtc 0
in a,(c)
cp e ; e=poids fort vRam
jr z,@crtc0
;
; Ce n'est pas un Amstrad Cpc Crtc 0
; Serait-ce par hasard un Amstrad Cpc Crtc 1 ?
;
ld bc,#bc1F ; on teste si c'est un crtc 1
out (c),c ; a sera différent de 0
;
ld b,#bf ; si a=0, ce sera un crtc 2 par élimination.
in a,(c)
jr z,@crtc2
;
; Ce n'est pas un Amstrad Cpc Crtc 2
; c'est donc forcément par élimination, un Amstrad Cpc Crtc 1
;
jr @crtc1
;
; it's a crtc 0
;
@crtc0 xor a : jr @leave
@crtc1 ld a, 1 : jr @leave
@crtc2 ld a, 2 : jr @leave
@crtc3 ld a, 3 : jr @leave
@crtc4 ld a, 4 : jr @leave

@leave
endm

Macro: DS_BASIC_GET_PARAM(param) linking/src/demosystem/basic_macros.asm:4

Search a given parameter in the basic program line Input - param: the parameter to search (as a string)
Show Source
macro DS_BASIC_GET_PARAM param
	    jr @execute
@param 
	defb {param}
	defb '='
@execute
		; setup the parameters to search the string
		ld hl, @param
		ld a, string_len({param}) + 1 ; +1 for the '='
		ld (ds_search_end_of_substring.searched_string_length), a
		ld (ds_search_end_of_substring.searched_string_address), hl

		; skip process if there is no comment in the basic prompt
		call ds_basic_first_comment_char_address
		ret nz

		call ds_search_end_of_substring
	endm
Referenced in:

Macro: DS_BASIC_PARAM_IS(value) linking/src/demosystem/basic_macros.asm:40

Check if a parameter is equal to a given value. ATTENTION! This version does in fact a prefix search, there is no notion of the end of the parameter value (like a space or comment char). Precondition - HL: address of the first character after the '=' of the parameter The string is at max 255 characters long. Input - value: the value to compare to (as a string) Modified values - BC Postcondition - Z flag set if the parameter value is equal to the given value -HL points to the next character after the compared value
Show Source
macro DS_BASIC_PARAM_IS value
		jr @execute
@value
		defb {value}
@execute

		ld de, @value
		ld a, string_len({value})
		ld (ds_search_end_of_substring.searched_string_length), a
		ld (ds_search_end_of_substring.searched_string_address), de

		ld bc, 255 ; TODO check if we can provide a value
		call ds_search_end_of_substring
	endm
Referenced in:

Macro: __SWITCH_TO_BOOTSTRAP_STACK__() linking/src/demosystem/private.asm:71

Save the stack from the main program, then switch to the demosystem one Must be called from &C1 Modified : - SP - 1 word at (__ds_program_stack_backup__)
Show Source
macro __SWITCH_TO_BOOTSTRAP_STACK__
        ld (__ds_bootstrap_program_stack_backup__), sp
        ld sp, __ds_bootstrap_stack__ 
        assert __ds_bootstrap_stack__ > &C000; "The stack needs to be in the same space has we do not force the use of DI"
    endm
Referenced in:

Macro: __SWITCH_TO_DS_STACK__() linking/src/demosystem/private.asm:77

Show Source
macro __SWITCH_TO_DS_STACK__
        ld (__ds_demosystem_bootstrap_stack_backup__), sp
        ld sp, __DS_STACK__ 
        assert __DS_STACK__ <= &C000 && __DS_STACK__ >= &4000
    endm
Referenced in:

Macro: __SWITCH_TO_PROG_STACK__() linking/src/demosystem/private.asm:86

Referenced in:

Macro: __DS_SELECT_DS_FULL_SPACE__() linking/src/demosystem/private.asm:93

Select the full C2 memory space Be careful, di must be set to avoid crash if there is not ei:ret or whatever in 0x38
Referenced in:

Macro: __DS_FIRMWARE_CHECK_IF_FLOPPY_DRIVE__() linking/src/demosystem/private.asm:100

Macro: __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__() linking/src/demosystem/private.asm:105

Show Source
macro __DS_FIRMWARE_CHECK_IF_ALBIREO_LIKE__
        ld a,(&be5f)
        or a
    endm
Referenced in:

Macro: DS_PRIVATE_RESET_TIMER() linking/src/demosystem/private.asm:115

Reset the basic timer. MOD: - HL
Show Source
macro DS_PRIVATE_RESET_TIMER
        if USE_BASIC_TIMER
            ld hl, 0
            ld (&b8b4), hl
        endif
    endm
Referenced in:

Macro: DS_PRIVATE_COLLECT_TIMER_IN(reg16) linking/src/demosystem/private.asm:124

Get the basic timer (i.e. number of halts since last reset)
Show Source
macro DS_PRIVATE_COLLECT_TIMER_IN reg16
        if USE_BASIC_TIMER
            ld {reg16}, (&b8b4)
        endif
    endm
Referenced in:

Macro: DS_PRIVATE_BOOSTER_COMMUNICATION(code, reg16) linking/src/demosystem/private.asm:134

send a code and its 16bits value to the cpc booster modified: A, BC precondition: {reg16} != BC, {reg16} != AF
Show Source
macro DS_PRIVATE_BOOSTER_COMMUNICATION code, reg16
        if USE_CPCBOOSTER
            LD BC, BOOSTER_COMMUNICATION_PORT
            ld a, {code}
            out (c), a
            out (c), {reg16}.low
            out (c), {reg16}.high
        endif
    endm
Referenced in:

Macro: DS_INITIALIZATION() linking/src/demosystem/public.asm:38

This macro should be called at the very beginning of the demo. it aims at checking the kind of device use to load
Show Source
macro DS_INITIALIZATION
    DS_PRIVATE_CPCBOOSTER_INIT_COMMUNICATION() ; setup the booster if flag activated
    DS_BACKUP_FIRMWARE()
endm
Referenced in:

Macro: DS_SELECT_A_MEMORY_SPACE(space) linking/src/demosystem/public.asm:47

Select a memory space for the demo Completly relocatable code
Show Source
macro DS_SELECT_A_MEMORY_SPACE space
    assert {space} >= 0xC0 and {space} <= 0xc7
    ld bc, &7f00 + {space} : out (c),c  
endm
Referenced in:

Macro: DS_SELECT_DS_BOOTSTRAP_SPACE() linking/src/demosystem/public.asm:52

Referenced in:

Macro: DS_SELECT_MAIN_SPACE() linking/src/demosystem/public.asm:56

Show Source
macro DS_SELECT_MAIN_SPACE
    ; TODO allow to select a different bank
    DS_SELECT_A_MEMORY_SPACE(DS_MAIN_SPACE_GA)
endm
Referenced in:

Macro: DS_SAVE_SCREEN_MODE(mode) linking/src/demosystem/public.asm:61

Show Source
macro DS_SAVE_SCREEN_MODE mode
    assert {mode} == &8c || {mode} == &8d || {mode} == &8e
    di
        DS_SELECT_DS_BOOTSTRAP_SPACE() 
        ld a, {mode}
        call __DS_SAVE_SCREEN_MODE__
        DS_SELECT_MAIN_SPACE()
    ei
endm
Referenced in:

Macro: DS_LOAD_FILE_IN_EXTRA_PAGE(filename, filename_size, address, loading_options) linking/src/demosystem/public.asm:93

Request the demosystem to load a file. This macro must be called when being in space &c0 The process to load a file is the following: - memory conf. in &C1 - restore the system - memory conf in &C2 - load the file - backup the system - memory conf in C1 - restore the normal stack - memory conf in &C0 In case of failure the program is stucked In case of success: - page 1 contains the loaded file - bc contains the length of the file - de contains the expected destination of the file Input: - filename: address to the filename - address: loading address IN THE EXTRA page
Show Source
macro DS_LOAD_FILE_IN_EXTRA_PAGE filename, filename_size, address, loading_options
    __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__({filename}, {filename_size}, {address}, true, {loading_options})
endm
Referenced in:

Macro: __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__(filename, filename_size, address, restore_bank, loading_options) linking/src/demosystem/public.asm:100

Private macro. Do not use directly Load a file and optionnaly restore &C0
Show Source
macro __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__ filename, filename_size, address, restore_bank, loading_options

    assert {filename} < 0xC000, "The filename cannot be in the address space [&C000-&FFFF] because we switch of bank"

    ; TODO add memory check to ensure we do no load in restricted areas

    assert $<0xC000, "You cannot be here as we will switch in &C1 and &C2 configurations" ; TODO use a real filtering adress bacause we do not have to be so pedantic
    assert {filename_size} > 0, "You need a file name"

    DS_SELECT_DS_BOOTSTRAP_SPACE() 

        ld hl, {filename}
        ld de, {address}
        ld bc, {filename_size}*256 + {loading_options}
        call DS_LOAD_ADDRESS

    if {restore_bank}
        push bc
            DS_SELECT_MAIN_SPACE()
        pop bc
    endif
endm
Referenced in:

Macro: DS_LOAD_FILE_IN_MAIN_PAGE(filename_addr, filename_size, load_address, loading_options) linking/src/demosystem/public.asm:129

Load first the file in extra page. Once done, move it, in the main memory. This is a slow process as each byte has to pass over a buffer TODO handle a fast copy for bytes NOT in &4000-&7fff space as they can skip the buffer TODO handle case where the memory is overriden by the loaded file
Show Source
macro DS_LOAD_FILE_IN_MAIN_PAGE filename_addr, filename_size, load_address, loading_options
    ; Load the file and stay in the extra memory configuration
    __DS_LOAD_FILE_IN_EXTRA_PAGE_INNER__({filename_addr}, {filename_size}, DS_FIRST_AVAILABLE_ADDRESS, false, {loading_options})
    
    ; By construction BC contains the number of byte read
    ld hl, DS_FIRST_AVAILABLE_ADDRESS
    ld de, {load_address}
    call __DS_COPY_FROM_EXTRA_TO_MAIN__

    DS_SELECT_MAIN_SPACE()

endm
Referenced in:

Macro: DS_LOAD_AND_RUN_FILE_IN_MAIN_PAGE(filename, filename_size, load_address, exec_address, loading_options) linking/src/demosystem/public.asm:149

Load first the file in extra page. Once done, move it, in the main memory. This is a slow process as each byte has to pass over a buffer. Then launch it TODO handle a fast copy for bytes NOT in &4000-&7fff space as they can skip the buffer TODO handle case where the memory is overriden by the loaded file
Show Source
macro DS_LOAD_AND_RUN_FILE_IN_MAIN_PAGE filename, filename_size, load_address, exec_address, loading_options

    DS_LOAD_FILE_IN_MAIN_PAGE( {filename}, {filename_size}, {load_address}, {loading_options})
    jp {exec_address}
	assert $<={load_address}

endm

Macro: DS_MAKE_FIRMWARE_QUIET() linking/src/demosystem/public.asm:162

Ensure the demosystem will not write anywhere It is probably mandatory using C1 as any print will destroy the demosystem
Show Source
macro DS_MAKE_FIRMWARE_QUIET
    di

        ; Coupe tout son et on s'assure qu'aucun
        ; évènement sonore est en cours de traitement
        call &bca7 ; SOUND RESET
        ; Purge de tout appui de touche en cours de traitement
        call &bd3d ; KM FLUSH
        ; Désactive complètement de la gestion du clavier
        ld a,&c9 ; RET
        ld (&bdf4),a ; KM SCAN KEYS
        ; Désactive les messages d'erreur disquette
        ; de cette façon, les erreurs ne sont plus bloquantes
        ; et les messages d'erreur ne sont plus affichés
        ld a,&ff ; &ff = Désactivé
        ld (&be78),a
        ; Désactive le clignotement des couleurs
        ld hl,&b7f9 ; HL = Event block des couleurs
        call &BCDD ; KL_DEL_FRAME_FLY
        ; Désactive tout affichage (au cas où)
        call &BB57 ; TXT_VDU_DISABLE

    ei
endm

Macro: DS_COPY_MEMORY_FROM_EXTRA_PAGE_TO_MAIN_PAGE(from, to, page, size) linking/src/demosystem/public.asm:190

Copy something loaded in the extra memory into the main memory
Show Source
macro DS_COPY_MEMORY_FROM_EXTRA_PAGE_TO_MAIN_PAGE from, to, page, size

    @from_until = {from} + {size}
    @to_until = {to} + {size}

    assert {from} >= 0x4000 and {from} < 0x8000 and  @from_until >= 0x4000 and @from_until < 0x8000, "You can copy at maximum 0x4000 bytes, from [0x4000;0x8000["
    assert ({to} < 0x4000 || {to} >= 0x8000) and (@to_until < 0x4000 || @to_until >= 0x8000), "You can paste only outside of [0x4000;0x8000["


    DS_SELECT_A_MEMORY_SPACE({eval}{page})

    ld bc, {size}
    ld de, {to}
    ld hl, {from}
    ldir

    DS_SELECT_MAIN_SPACE()
    

endm

Macro: DS_BACKUP_FIRMWARE() linking/src/demosystem/public.asm:214

Backup the firmware. Has to be called one time at the beginning of the demo.
Referenced in:

Macro: MOVE_CRUNCHED_DATA(from, to) linking/src/demosystem/linker_common.asm:97

Sometimes there are conflicts between the crunched data areas and the uncrunched data areas. Mainly because of banks overlap or lack of free memory. To avoid this, we first move the crunched data to a safe area, then uncrunch from there.
Show Source
macro MOVE_CRUNCHED_DATA from, to
		ld hl, {from}.start
		ld de, {to}
		ld bc, {from}.length
		ldir
	endm
Referenced in:

Macro: LOAD_N_CRUNCH_WITH(cruncher_directive, label, fname) linking/src/demosystem/linker_common.asm:130

Load {fname} and crunch it with the selected cruncher. The crunched data is stored at label {label}. Additional sublabels are created: .start : address of the first byte of crunched data .next : address of the byte after the last byte of crunched data .length: length in bytes of the crunched data .uncrunched_length: length in bytes of the uncrunched data Depends on SELECTED_CRUNCHER TODO : remove dependecy to SELECTED_CRUNCHER by passing it as parameter
Show Source
macro LOAD_N_CRUNCH_WITH cruncher_directive, label, fname
		@content = load({fname})
		{label}
		.start
			{cruncher_directive}
				db @content
			LZCLOSE
		.next
		.last = $-1
		.length = $-.start
		.uncrunched_length = list_len(@content)


		assert BASM_LATEST_CRUNCH_INPUT_DATA_SIZE == .uncrunched_length
		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length

		if CRUNCHER_IS_BACKWARD(SELECTED_CRUNCHER)
			assert SELECTED_CRUNCHER == CRUNCHER_ZX0_BACKWARD, "This case has never been tested, please doublecheck the delta size calculation in basm"
			.delta = BASM_LATEST_CRUNCH_DELTA_SIZE
			assert .delta != -1
		else
			; TODO add delta information for crunchers providing it
			; (for example zx0)
			.delta = -1
		endif

		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {hex}.start,"-",{hex}($-1),"]"
	endm
Referenced in:

Macro: UNCRUNCH_PRELUDE_NOT_BACKWARD(from, to) linking/src/demosystem/linker_common.asm:166

Add some tests to check that the selected data is valid for non backward crunchers Parameters: from: start address of the crunched data (the very first byte) to: address where the uncrunched data will be stored (the very first byte)
Show Source
macro UNCRUNCH_PRELUDE_NOT_BACKWARD, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			assert {to} >= {from}.next | {to} < {from}.start ; BUG does not take into account overlapping areas; use delta for that
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm
Referenced in:

Macro: UNCRUNCH_PRELUDE_BACKWARD(from, to) linking/src/demosystem/linker_common.asm:180

Add some tests to check that the selected data is valid for backward crunchers Parameters: from: start address of the crunched data (the very first byte AND NOT the very last byte) to: address where the uncrunched data will be stored (the very first byte AND NOT the very last byte)
Show Source
macro UNCRUNCH_PRELUDE_BACKWARD, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			if {from}.start >= {to}
				assert {to} + {from}.length < {from}.start
			else
				assert {from}.delta != -1, "Delta size must be known for backward crunchers safety"
				assert {to} >= {from.last} + {from}.delta
			endif
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm
Referenced in:

Macro: INDIRECT_UNCRUNCH_PRELUDE_BACKWARD(moved_from, from, to) linking/src/demosystem/linker_common.asm:194

Show Source
macro INDIRECT_UNCRUNCH_PRELUDE_BACKWARD, moved_from, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			if {moved_from} >= {to}
				assert {to} + {from}.length < {from}.start
			else
				assert {from}.delta != -1, "Delta size must be known for backward crunchers safety"
				assert {to} >= {moved_from} + {from}.length + {from}.delta
			endif
		endif
		print "Uncrunch from ", {hex}{from}, " to ", {hex}{to}
	endm
Referenced in:

Macro: INDIRECT_UNCRUNCH_PRELUDE_NOT_BACKWARD(moved_from, from, to) linking/src/demosystem/linker_common.asm:216

Show Source
macro INDIRECT_UNCRUNCH_PRELUDE_NOT_BACKWARD, moved_from, from, to
		ifdef {from}.start
			assert {from} == {from}.start
			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into account overlapping areas; use delta for that
		endif
		print "Uncrunch from ", {hex}{moved_from}, " (originally ", {hex}{from}, ") to ", {hex}{to}
	endm
Referenced in:

Macro: UNCRUNCH_STANDARD_BACKWARD(from, to) linking/src/demosystem/linker_common.asm:233

Request to uncrunch data from {from} to {to} with the selected cruncher. Add some tests to check that the selected data is valid. Parameters: - {from}: start address of the crunched data (the very first byte) - {to}: address where the uncrunched data will be stored (the very first byte)
Show Source
macro UNCRUNCH_STANDARD_BACKWARD, from, to
		UNCRUNCH_PRELUDE_BACKWARD({from}, {to})

		ld hl, {from}.last
		ld de, {to} + {from}.uncrunched_length - 1
		call uncrunch
	endm
Referenced in:

Macro: INDIRECT_UNCRUNCH_STANDARD_BACKWARD(moved_from, from, to) linking/src/demosystem/linker_common.asm:250

Indirect uncrunch is used when the crunched data has been move elsewhere. As such the from labels are not correct anymore. Parameters: - {moved_from}: address where the crunched data has been moved - {from}: start address of the crunched data (the very first byte) BEFORE it has been moved - {to}: address where the uncrunched data will be stored (the very first byte)
Show Source
macro INDIRECT_UNCRUNCH_STANDARD_BACKWARD, moved_from, from, to
		INDIRECT_UNCRUNCH_PRELUDE_BACKWARD({moved_from}, {from}, {to})

		ld hl, {moved_from} +  {from}.length - 1
		ld de, {to} + {from}.uncrunched_length - 1
		call uncrunch
	endm
Referenced in:

Macro: UNCRUNCH_STANDARD_NOT_BACKWARD(from, to) linking/src/demosystem/linker_common.asm:265

Request to uncrunch data from {from} to {to} with the selected cruncher. Add some tests to check that the selected data is valid. Parameters: - {from}: start address of the crunched data (the very first byte) - {to}: address where the uncrunched data will be stored (the very first byte)
Show Source
macro UNCRUNCH_STANDARD_NOT_BACKWARD, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld hl, {from}
		ld de, {to}
		call uncrunch
	endm
Referenced in:

Macro: INDIRECT_UNCRUNCH_STANDARD_NOT_BACKWARD(moved_from, from, to) linking/src/demosystem/linker_common.asm:281

Indirect uncrunch is used when the crunched data has been moved elsewhere. As such the from labels are not correct anymore. Parameters: - {moved_from}: address where the crunched data has been moved - {from}: start address of the crunched data (the very first byte) BEFORE it has been moved - {to}: address where the uncrunched data will be stored (the very first byte)
Show Source
macro INDIRECT_UNCRUNCH_STANDARD_NOT_BACKWARD, moved_from, from, to
		INDIRECT_UNCRUNCH_PRELUDE_NOT_BACKWARD({moved_from}, {from}, {to})

		ld hl, {moved_from}
		ld de, {to}
		call uncrunch
	endm
Referenced in:

Macro: UNCRUNCH_LZ4(from, to) linking/src/demosystem/linker_common.asm:295

Request to uncrunch data from {from} to {to} with LZ4 cruncher. Add some tests to check that the selected data is valid. Parameters: - {from}: start address of the crunched data (the very first byte) - {to}: address where the uncrunched data will be stored (The very first byte)v
Show Source
macro UNCRUNCH_LZ4, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})


		ld hl, {from}.start
		ld bc, {from}.length
		ld de, {to}
		call uncrunch
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:488
    				UNCRUNCH_LZ4({from}, {to})

Macro: UNCRUNCH_UPKR(from, to) linking/src/demosystem/linker_common.asm:312

Request to uncrunch data from {from} to {to} with UPKR cruncher. Add some tests to check that the selected data is valid. Parameters: - {from}: start address of the crunched data (the very first byte) - {to}: address where the uncrunched data will be stored (The very first byte)
Show Source
macro UNCRUNCH_UPKR, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld ix, {from}
		ld de, {to} : exx
		call uncrunch
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:485
    				UNCRUNCH_UPKR({from}, {to})

Macro: UNCRUNCH_SHRINKLER(from, to) linking/src/demosystem/linker_common.asm:327

Request to uncrunch data from {from} to {to} with SHRINKLER cruncher. Add some tests to check that the selected data is valid. Parameters: - {from}: start address of the crunched data (the very first byte) - {to}: address where the uncrunched data will be stored (The very first byte)
Show Source
macro UNCRUNCH_SHRINKLER, from, to
		UNCRUNCH_PRELUDE_NOT_BACKWARD({from}, {to})

		ld ix, {from}.start
		ld de, {to}
		call uncrunch
	endm
Referenced in:

Macro: INSTALL_EXOMIZER() linking/src/demosystem/linker_common.asm:336

Install the uncruncher for exomizer
Show Source
macro INSTALL_EXOMIZER
		include once "inner://deexo.asm"
	uncrunch
		Mizoumizeur()
		ret
	endm
Referenced in:

Macro: INSTALL_APLIB() linking/src/demosystem/linker_common.asm:344

Install the uncruncher for aplib
Show Source
macro INSTALL_APLIB
			include once "inner://unaplib_fast.asm"
	uncrunch
		ApUnpack()
		ret
	endm
Referenced in:

Macro: INSTALL_UPKR() linking/src/demosystem/linker_common.asm:352

Install the uncruncher for upkr
Show Source
macro INSTALL_UPKR
		uncrunch
		include once "inner://uncrunch/upkr.asm"
		org upkr.probs_e ; we need to skip some space for the upkr probe
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:546
    				INSTALL_UPKR()

Macro: INSTALL_LZ4() linking/src/demosystem/linker_common.asm:359

Install the uncruncher for lz4
Show Source
macro INSTALL_LZ4
		uncrunch
		include once "inner://lz4_docent.asm"
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:549
    				INSTALL_LZ4()

Macro: INSTALL_LZ48() linking/src/demosystem/linker_common.asm:365

Install the uncruncher for LZ48
Show Source
macro INSTALL_LZ48
		uncrunch
		include once "inner://lz48decrunch.asm"
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:552
    				INSTALL_LZ48()

Macro: INSTALL_LZ49() linking/src/demosystem/linker_common.asm:371

Install the uncruncher for LZ49
Show Source
macro INSTALL_LZ49
		uncrunch
		include once "inner://lz49decrunch.asm"
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:555
    				INSTALL_LZ49()

Macro: INSTALL_LZSA1() linking/src/demosystem/linker_common.asm:377

Install the uncruncher for LZSA1
Show Source
macro INSTALL_LZSA1
		uncrunch
		include once "inner://unlzsa1_fast.asm"
		DecompressLZSA1(void)
	endm
Referenced in:

Macro: INSTALL_LZSA2() linking/src/demosystem/linker_common.asm:384

Install the uncruncher for LZSA2
Show Source
macro INSTALL_LZSA2
		uncrunch
		include once "inner://unlzsa2_fast.asm"
		DecompressLZSA2(void)
	endm
Referenced in:

Macro: INSTALL_SHRINKLER() linking/src/demosystem/linker_common.asm:391

Install the uncruncher for shrinkler
Show Source
macro INSTALL_SHRINKLER
		include once "inner://deshrink.asm"
		uncrunch equ shrinkler_decrunch
		org probs + &800
	endm
Referenced in:

Macro: INSTALL_ZX0() linking/src/demosystem/linker_common.asm:398

Install the uncruncher for zx0
Show Source
macro INSTALL_ZX0
		uncrunch
		include once "inner://dzx0_fast.asm"
		DecompressZX0()
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:567
    				INSTALL_ZX0()

Macro: INSTALL_ZX0_BACKWARD() linking/src/demosystem/linker_common.asm:406

Install the uncruncher for zx0 backward
Show Source
macro INSTALL_ZX0_BACKWARD
		uncrunch
		include once "inner://uncrunch/dzx0_turbo_back.asm"
		DecompressZX0TurboBackward()
	endm
Referenced in:

Macro: INSTALL_ZX7() linking/src/demosystem/linker_common.asm:413

Install the uncruncher for zx7
Show Source
macro INSTALL_ZX7
		uncrunch
		include once "inner://uncrunch/dzx7_turbo.asm"
	endm
Referenced in:
  • linking/src/demosystem/linker_common.asm:573
    				INSTALL_ZX7()

Macro: LOAD_N_CRUNCH(label, fname) linking/src/demosystem/linker_common.asm:422

Load a data file and crunch it with the selected cruncher. The file is crunched with the selected cruncher at the label `label` Sub labels .start is synonyme, .next is the byte after last crunched byte, .length is the crunched size
Show Source
macro LOAD_N_CRUNCH label, fname
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
				LOAD_N_CRUNCH_WITH(LZEXO, {label}, {fname})
				break
			case CRUNCHER_APLIB
				LOAD_N_CRUNCH_WITH(LZAPU, {label}, {fname})
				break
			case CRUNCHER_UPKR
				LOAD_N_CRUNCH_WITH(LZUPKR, {label}, {fname})
				break
			case CRUNCHER_LZ4
				LOAD_N_CRUNCH_WITH(LZ4, {label}, {fname})
				break
			case CRUNCHER_LZ48
				LOAD_N_CRUNCH_WITH(LZ48, {label}, {fname})
				break
			case CRUNCHER_LZ49
				LOAD_N_CRUNCH_WITH(LZ49, {label}, {fname})
				break
			case CRUNCHER_LZSA1
				LOAD_N_CRUNCH_WITH(LZSA1, {label}, {fname})
				break
			case CRUNCHER_LZSA2
				LOAD_N_CRUNCH_WITH(LZSA2, {label}, {fname})
				break
			case CRUNCHER_SHRINKLER
				LOAD_N_CRUNCH_WITH(LZSHRINKLER, {label}, {fname})
				break
			case CRUNCHER_ZX0
				LOAD_N_CRUNCH_WITH(LZX0, {label}, {fname})
				break
			case CRUNCHER_ZX0_BACKWARD
				LOAD_N_CRUNCH_WITH(LZX0_BACKWARD, {label}, {fname})
				break
			case CRUNCHER_ZX7
				LOAD_N_CRUNCH_WITH(LZX7, {label}, {fname})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm
Referenced in:
  • IntroHBL/src/intro_linked.asm:34
    LOAD_N_CRUNCH(C6_4000, "C6.4000")
  • IntroHBL/src/intro_linked.asm:35
    LOAD_N_CRUNCH(C4_4000, "C4.4000")
  • IntroHBL/src/intro_linked.asm:37
    LOAD_N_CRUNCH(C0_8000, "C0.8000")
  • IntroHBL/src/intro_linked.asm:38
    LOAD_N_CRUNCH(C0_800, "C0.800")
  • IntroHBL/src/intro_loader.asm:106
    LOAD_N_CRUNCH C000, "loading.scr"
  • polar_dots/src/link.asm:45
    LOAD_N_CRUNCH(C0_1000, "C0.1000")
  • polar_dots/src/link.asm:46
    LOAD_N_CRUNCH(C0_C000, "C0.C000")
  • polar_dots/src/link.asm:47
    LOAD_N_CRUNCH(C0_2E00, "C0.2E00")
  • polar_dots/src/link.asm:48
    LOAD_N_CRUNCH(C0_4000, "C0.4000")
  • polar_dots/src/link.asm:49
    LOAD_N_CRUNCH(C0_8000, "C0.8000")
  • polar_dots/src/link.asm:50
    LOAD_N_CRUNCH(C4_4000, "C4.4000")
  • polar_dots/src/link.asm:51
    LOAD_N_CRUNCH(C5_4000, "C5.4000")
  • polar_dots/src/link.asm:52
    LOAD_N_CRUNCH(C6_4000, "C6.4000")
  • polar_dots/src/link.asm:53
    LOAD_N_CRUNCH(C7_4000, "C7.4000")
  • polar_dots/src/polar_loader.asm:106
    LOAD_N_CRUNCH C000, "loading.scr"
  • MakeItEasy/src/dsk_multimoderupture8_part2.asm:14
    LOAD_N_CRUNCH(main_800, MAIN_800_FNAME)
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:164
    LOAD_N_CRUNCH(c4_4000, "C4.4000")
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:165
    LOAD_N_CRUNCH(c5_4000, "C5.4000")
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:166
    LOAD_N_CRUNCH(c6_4b42, "C6.4b42")
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:168
    LOAD_N_CRUNCH(c7_4000, "C7.4000")
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:173
    LOAD_N_CRUNCH( main_4000, MAIN_4000_FNAME) 
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:175
    LOAD_N_CRUNCH(main_c000, "MAIN.C000")
  • MakeItEasy/src/loading_screen.asm:94
    LOAD_N_CRUNCH C000, "loading.scr"

Macro: UNCRUNCH(from, to) linking/src/demosystem/linker_common.asm:469

Uncrunch data from {from} to {to} with the selected cruncher Parameters: - from: start address of the crunched data (the very first byte). It is better to use a label (with its sublabels) than an address - to: start address where the uncrunched data will be stored (the very first byte)
Show Source
macro UNCRUNCH from, to
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
			case CRUNCHER_APLIB:
			case CRUNCHER_LZ48:
			case CRUNCHER_LZ49:
			case CRUNCHER_LZSA1:
			case CRUNCHER_LZSA2:
			case CRUNCHER_ZX0:
			case CRUNCHER_ZX7:
				UNCRUNCH_STANDARD_NOT_BACKWARD({from}, {to})
				break
			case CRUNCHER_ZX0_BACKWARD:
				UNCRUNCH_STANDARD_BACKWARD({from}, {to})
				break
			case CRUNCHER_UPKR:
				UNCRUNCH_UPKR({from}, {to})
				break
			case CRUNCHER_LZ4:
				UNCRUNCH_LZ4({from}, {to})
				break
			case CRUNCHER_SHRINKLER
				UNCRUNCH_SHRINKLER({from}, {to})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm
Referenced in:
  • IntroHBL/src/intro_linked.asm:14
    UNCRUNCH(C6_4000, 0x4000)
  • IntroHBL/src/intro_linked.asm:18
    UNCRUNCH(C4_4000, 0x4000)
  • IntroHBL/src/intro_linked.asm:22
    UNCRUNCH(C0_8000, 0x8000)
  • IntroHBL/src/intro_linked.asm:23
    UNCRUNCH(C0_800, 0x800)
  • IntroHBL/src/intro_loader.asm:46
    UNCRUNCH C000, 0xc000
  • polar_dots/src/link.asm:18
    UNCRUNCH(C7_4000, 0x4000)
  • polar_dots/src/link.asm:21
    UNCRUNCH(C6_4000, 0x4000)
  • polar_dots/src/link.asm:36
    UNCRUNCH(C0_C000, 0xC000)
  • polar_dots/src/link.asm:37
    UNCRUNCH(C0_8000, 0x8000)
  • polar_dots/src/link.asm:38
    UNCRUNCH(C0_4000, 0x4000)
  • polar_dots/src/link.asm:39
    UNCRUNCH(C0_2E00, 0x2E00)
  • polar_dots/src/link.asm:40
    UNCRUNCH(C0_1000, FIRST_BYTE_ADDRESS)
  • polar_dots/src/polar_loader.asm:46
    UNCRUNCH C000, 0xc000
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:23
    UNCRUNCH(c4_4000, &4000)  
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:29
    UNCRUNCH(c5_4000, &4000)  
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:71
    UNCRUNCH(main_c000, &c000)
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:131
    UNCRUNCH(c7_4000, &8000)  
  • MakeItEasy/src/loading_screen.asm:21
    UNCRUNCH C000, 0xc000

Macro: INDIRECT_UNCRUNCH(moved_from, from, to) linking/src/demosystem/linker_common.asm:507

Indirect uncrunch data from {from} to {to} with the selected cruncher Parameters: - moved_from: address where the crunched data has been moved - from: start address of the crunched data (the very first byte) was initially before being moved. It is better to use a label (with its sublabels) than an address - to: start address where the uncrunched data will be stored (the very first byte) TODO: implement all the case. ATM I have only implemented what I used
Show Source
macro INDIRECT_UNCRUNCH moved_from, from, to
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
			case CRUNCHER_APLIB:
			case CRUNCHER_LZ48:
			case CRUNCHER_LZ49:
			case CRUNCHER_LZSA1:
			case CRUNCHER_LZSA2:
			case CRUNCHER_ZX0:
			case CRUNCHER_ZX7:
				INDIRECT_UNCRUNCH_STANDARD_NOT_BACKWARD({moved_from}, {from}, {to})
				break
			case CRUNCHER_ZX0_BACKWARD:
				INDIRECT_UNCRUNCH_STANDARD_BACKWARD({moved_from}, {from}, {to})
				break
			case CRUNCHER_UPKR:
				INDIRECT_UNCRUNCH_UPKR({moved_from}, {from}, {to})
				break
			case CRUNCHER_LZ4:
				INDIRECT_UNCRUNCH_LZ4({moved_from}, {from}, {to})
				break
			case CRUNCHER_SHRINKLER
				INDIRECT_UNCRUNCH_SHRINKLER({moved_from}, {from}, {to})
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
		ends
	endm
Referenced in:

Macro: INSTALL_UNCRUNCHER() linking/src/demosystem/linker_common.asm:537

Install the uncruncher for the selected cruncher
Show Source
macro INSTALL_UNCRUNCHER
		switch SELECTED_CRUNCHER
			case CRUNCHER_EXOMIZER:
				INSTALL_EXOMIZER()
				break
			case CRUNCHER_APLIB:
				INSTALL_APLIB()
				break
			case CRUNCHER_UPKR:
				INSTALL_UPKR()
				break
			case CRUNCHER_LZ4
				INSTALL_LZ4()
				break
			case CRUNCHER_LZ48
				INSTALL_LZ48()
				break
			case CRUNCHER_LZ49
				INSTALL_LZ49()
				break
			case CRUNCHER_LZSA1
				INSTALL_LZSA1()
				break
			case CRUNCHER_LZSA2
				INSTALL_LZSA2()
				break
			case CRUNCHER_SHRINKLER
				INSTALL_SHRINKLER()
				break
			case CRUNCHER_ZX0
				INSTALL_ZX0()
				break
			case CRUNCHER_ZX0_BACKWARD
				INSTALL_ZX0_BACKWARD()
				break
			case CRUNCHER_ZX7
				INSTALL_ZX7()
				break
			default:
				fail "Unhandled case: ", SELECTED_CRUNCHER
			ends
	endm
Referenced in:

Macro: CHECK_IF_PART_IS_OVER() linking/src/limited_duration.asm:8

Show Source
macro CHECK_IF_PART_IS_OVER
		; handle the counting
		ld hl, SCREEN_MAXIMUM_DURATION
@counter equ $-2
		dec hl
		ld (@counter), hl

		; handle the leaving
		ld a, h
		or l
	endm
Referenced in:

Macro: PLAY_MUSIC() polar_dots/src/music_akm.asm:7

Show Source
macro PLAY_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			call PLY_AKM_Play
		ld bc, &7f00 + &c0 : out (c), c
	endm
Referenced in:

Macro: INIT_MUSIC() polar_dots/src/music_akm.asm:14

Show Source
macro INIT_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			ld hl, music_data
			xor a
			call PLY_AKM_Init
		ld bc, &7f00 + &c0 : out (c), c
	endm
Referenced in:

Macro: STOP_MUSIC() polar_dots/src/music_akm.asm:22

Show Source
macro STOP_MUSIC
		ld bc, &7f00 + &c7 : out (c), c
			call PLY_AKM_Stop
		ld bc, &7f00 + &c0 : out (c), c
	endm
Referenced in:

Macro: PLY_AKM_db(label) polar_dots/src/PlayerAkmDevelop.asm:1912

Show Source
MACRO PLY_AKM_db label
                IFNDEF PLY_AKM_Rom
                        dkbs (void)
                        {label} db 0
                        dkbe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 1
                ENDIF
        ENDM
Referenced in:
  • polar_dots/src/PlayerAkmDevelop.asm:785
    PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      
  • polar_dots/src/PlayerAkmDevelop.asm:794
    PLY_AKM_db PLY_AKM_Track1_BaseNote                           
  • polar_dots/src/PlayerAkmDevelop.asm:796
    PLY_AKM_db PLY_AKM_Track1_EscapeNote                         
  • polar_dots/src/PlayerAkmDevelop.asm:798
    PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   
  • polar_dots/src/PlayerAkmDevelop.asm:800
    PLY_AKM_db PLY_AKM_Track1_EscapeWait                         
  • polar_dots/src/PlayerAkmDevelop.asm:804
    PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              
  • polar_dots/src/PlayerAkmDevelop.asm:806
    PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    
  • polar_dots/src/PlayerAkm_basm.asm:775
    PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      
  • polar_dots/src/PlayerAkm_basm.asm:784
    PLY_AKM_db PLY_AKM_Track1_BaseNote                           
  • polar_dots/src/PlayerAkm_basm.asm:786
    PLY_AKM_db PLY_AKM_Track1_EscapeNote                         
  • polar_dots/src/PlayerAkm_basm.asm:788
    PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   
  • polar_dots/src/PlayerAkm_basm.asm:790
    PLY_AKM_db PLY_AKM_Track1_EscapeWait                         
  • polar_dots/src/PlayerAkm_basm.asm:794
    PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              
  • polar_dots/src/PlayerAkm_basm.asm:796
    PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    

Macro: PLY_AKM_dw(label) polar_dots/src/PlayerAkmDevelop.asm:1924

Show Source
MACRO PLY_AKM_dw label
                IFNDEF PLY_AKM_Rom
                        dkws (void)
                        {label} dw 0
                        dkwe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 2
                ENDIF
        ENDM
Referenced in:
  • polar_dots/src/PlayerAkmDevelop.asm:790
    PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       
  • polar_dots/src/PlayerAkmDevelop.asm:792
    PLY_AKM_dw PLY_AKM_Track1_PtTrack                            
  • polar_dots/src/PlayerAkmDevelop.asm:802
    PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       
  • polar_dots/src/PlayerAkm_basm.asm:780
    PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       
  • polar_dots/src/PlayerAkm_basm.asm:782
    PLY_AKM_dw PLY_AKM_Track1_PtTrack                            
  • polar_dots/src/PlayerAkm_basm.asm:792
    PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       

Macro: DEBUG_SECTION_SIZE(name) polar_dots/src/sna.asm:72

Show Source
macro DEBUG_SECTION_SIZE, name
		print " {name}: [", {hex}section_start("{name}"), "-", {hex}section_stop("{name}"), \
			"] in ", {hex}section_mmr("{name}"), " uses ", {hex}section_used("{name}"), \
			" bytes until ",{hex}(section_start("{name}")+section_used("{name}"))

	endm
Referenced in:

Macro: SAVE_SECTION(name, fname) polar_dots/src/sna.asm:95

Show Source
macro SAVE_SECTION, name, fname
		section {name}
		save {fname}, section_start("{name}"), section_used("{name}")
	endm
Referenced in:
  • polar_dots/src/sna.asm:82
    SAVE_SECTION(generated_code_section_0, "C4.4000")
  • polar_dots/src/sna.asm:83
    SAVE_SECTION(generated_code_section_1, "C5.4000")
  • polar_dots/src/sna.asm:84
    SAVE_SECTION(generated_code_section_2,"C6.4000")
  • polar_dots/src/sna.asm:85
    SAVE_SECTION(music_section,"C7.4000")
  • polar_dots/src/sna.asm:86
    SAVE_SECTION(standard_screen_section, "C0.C000")
  • polar_dots/src/sna.asm:87
    SAVE_SECTION(generated_code_section_3,"C0.8000")
  • polar_dots/src/sna.asm:88
    SAVE_SECTION(generated_code_section_4,"C0.4000")
  • polar_dots/src/sna.asm:89
    SAVE_SECTION(generated_code_section_5,"C0.2E00")
  • polar_dots/src/sna.asm:90
    SAVE_SECTION(demo_code_section,"C0.1000")

Macro: MULTIMODE_WAIT(duration) polar_dots/src/polar.asm:32

Show Source
macro MULTIMODE_WAIT duration
		assert {duration} < MULTIMODE_WAIT_MAXIMAL_DURATION

		if {duration} < MULTIMODE_WAIT_MINIMAL_DURATION
			defs {duration}, 0
		else
			call multimode_wait.end - ({duration}-MULTIMODE_WAIT_MINIMAL_DURATION)
		endif
;			BREAKPOINT
;			call multimode_wait + {duration} - MULTIMODE_WAIT_MINIMAL_DURATION
;		endif
	endm
Referenced in:

Macro: MULTIMODE_HANDLE_BOTTOM_CORNER() polar_dots/src/polar.asm:45

Show Source
macro MULTIMODE_HANDLE_BOTTOM_CORNER

    
	MULTIMODE_WAIT(64 - (&26 - &1C) + &10 + 4-4 ) 

	ld l, CRTC_REG2_VALUE
;	BREAKPOINT CONDITION="C0<>&26"
; IMPORTANT *****************************
; start at HCC = &26
; 	
	exx
; preload the 2 MODEs
; H=left mode
; L=right mode  
;
	ld bc,&7f00
	ld hl,&8C8D    
	exx
;
	ld bc,&bc03
	ld a,&8e
	out (c),c
	inc b
	out (c),a
	ld bc,&bc02
	ld a,Reg2
	out (c),c
	inc b
	out (c),a
;
; maximal on RIGHT 
; HBL POS = 32
;
           	ld de,&0207
ADAP_REG2_BOTTOM1	ld h,32-1
	        MULTIMODE_WAIT(22+1+5+1+4+6+2+2+2+2+2-2)

;	repeat HEIGHT_AT_XPOS32

        ld a,HEIGHT_AT_XPOS32

LOOP_HEIGHT_AT_XPOS32

		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; = 2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6-4)
		dec a
		jr nz,LOOP_HEIGHT_AT_XPOS32
;	rend
;
; Transition 32 -> Pos 31
;
	MULTIMODE_WAIT(&22-20+1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4-2)
;
ADAP_REG2_BOTTOM2	ld h,31-1
;
;	repeat HEIGHT_AT_XPOS31
       ld a,HEIGHT_AT_XPOS31
LOOP_HEIGHT_AT_XPOS31
		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6-4)
		dec a
		jr nz,LOOP_HEIGHT_AT_XPOS31
;	rend
;
; Transition 31 -> Pos 30
;
	MULTIMODE_WAIT(&22-20+1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM3	ld h,30-1
;
	repeat HEIGHT_AT_XPOS30
		MULTIMODE_WAIT(&22-20)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6)
	rend
;
; Transition 30 -> Pos 29
;
	MULTIMODE_WAIT(&22-20)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM4	ld h,29-1
;
	repeat HEIGHT_AT_XPOS29
		MULTIMODE_WAIT(&22-20-1)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(6+1)
	rend
;
; Transition 29 -> Pos 28
;
	MULTIMODE_WAIT(&22-20-1)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(4)
;
ADAP_REG2_BOTTOM5	ld h,28-1
;
	repeat HEIGHT_AT_XPOS28
		MULTIMODE_WAIT(&22-20-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(8)
	rend
;
; Transition 28 -> Pos 27
;
	MULTIMODE_WAIT(&22-20-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(6)
;
ADAP_REG2_BOTTOM6	ld h,27-1
;
	repeat HEIGHT_AT_XPOS27
		MULTIMODE_WAIT(&22-20-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(8)
	rend
;
;
; Transition 27 -> Pos 26
;
	MULTIMODE_WAIT(&22-20-2-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(8)
;
ADAP_REG2_BOTTOM7	ld h,26-1
;
	repeat HEIGHT_AT_XPOS26
		MULTIMODE_WAIT(&22-20-2-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(10)
	rend
;
; Transition 26 -> Pos 25
;
	MULTIMODE_WAIT(&22-20-2-2)
	exx
	out (c),h   ; MODE droite
	exx
	dec b
	inc c
	out (c),c   ; REG 3 selection
	inc b
	out (c),d   ; =2
	out (c),e   ; = 7
	dec b
	dec c
	out (c),c   ; REG 2 selection
	inc b		
	out (c),l   ; envoie valeur R2 &2E
	exx
	out (c),l   ; MODE Gauche
	exx
	MULTIMODE_WAIT(2)
	out (c),h   ; 
	MULTIMODE_WAIT(8)
;
ADAP_REG2_BOTTOM8	ld h,25-1
;
	repeat HEIGHT_AT_XPOS25
		MULTIMODE_WAIT(&22-20-2-2)
		exx
		out (c),h   ; MODE droite
		exx
		dec b
		inc c
		out (c),c   ; REG 3 selection
		inc b
		out (c),d   ; =2
		out (c),e   ; = 7
		dec b
		dec c
		out (c),c   ; REG 2 selection
		inc b		
		out (c),l   ; envoie valeur R2 &2E
		exx
		out (c),l   ; MODE Gauche
		exx
		MULTIMODE_WAIT(2)
		out (c),h   ; 
		MULTIMODE_WAIT(10)
	rend
;
	out (c),l
;
	ld bc,&bc03
	ld a,CRTC_REG3_DEFAULT_VALUE  ; 
	out (c),c
	inc b
	out (c),a
	endm

Macro: GENERATE_SCREEN_DRAWING_TABLE() polar_dots/src/polar.asm:894

Show Source
macro GENERATE_SCREEN_DRAWING_TABLE
    	defs 16 ; safety area because we are using the stack when filling it
	    defs (1+NB_CIRCLES_TO_DRAW)*4, 0 ; address of routine + bank configuration with 7f
    endm
Referenced in:

Macro: PLY_AKM_db(label) polar_dots/src/PlayerAkm_basm.asm:1889

Show Source
MACRO PLY_AKM_db label
                IFNDEF PLY_AKM_Rom
                        dkbs (void)
                        {label} db 0
                        dkbe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 1
                ENDIF
        ENDM
Referenced in:
  • polar_dots/src/PlayerAkmDevelop.asm:785
    PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      
  • polar_dots/src/PlayerAkmDevelop.asm:794
    PLY_AKM_db PLY_AKM_Track1_BaseNote                           
  • polar_dots/src/PlayerAkmDevelop.asm:796
    PLY_AKM_db PLY_AKM_Track1_EscapeNote                         
  • polar_dots/src/PlayerAkmDevelop.asm:798
    PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   
  • polar_dots/src/PlayerAkmDevelop.asm:800
    PLY_AKM_db PLY_AKM_Track1_EscapeWait                         
  • polar_dots/src/PlayerAkmDevelop.asm:804
    PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              
  • polar_dots/src/PlayerAkmDevelop.asm:806
    PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    
  • polar_dots/src/PlayerAkm_basm.asm:775
    PLY_AKM_db PLY_AKM_Track1_WaitEmptyCell                      
  • polar_dots/src/PlayerAkm_basm.asm:784
    PLY_AKM_db PLY_AKM_Track1_BaseNote                           
  • polar_dots/src/PlayerAkm_basm.asm:786
    PLY_AKM_db PLY_AKM_Track1_EscapeNote                         
  • polar_dots/src/PlayerAkm_basm.asm:788
    PLY_AKM_db PLY_AKM_Track1_EscapeInstrument                   
  • polar_dots/src/PlayerAkm_basm.asm:790
    PLY_AKM_db PLY_AKM_Track1_EscapeWait                         
  • polar_dots/src/PlayerAkm_basm.asm:794
    PLY_AKM_db PLY_AKM_Track1_InstrumentCurrentStep              
  • polar_dots/src/PlayerAkm_basm.asm:796
    PLY_AKM_db PLY_AKM_Track1_InstrumentSpeed                    

Macro: PLY_AKM_dw(label) polar_dots/src/PlayerAkm_basm.asm:1901

Show Source
MACRO PLY_AKM_dw label
                IFNDEF PLY_AKM_Rom
                        dkws (void)
                        {label} dw 0
                        dkwe (void)
                ELSE
                        {label} equ PLY_AKM_ROM_Buffer + counter
                        counter = counter + 2
                ENDIF
        ENDM
Referenced in:
  • polar_dots/src/PlayerAkmDevelop.asm:790
    PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       
  • polar_dots/src/PlayerAkmDevelop.asm:792
    PLY_AKM_dw PLY_AKM_Track1_PtTrack                            
  • polar_dots/src/PlayerAkmDevelop.asm:802
    PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       
  • polar_dots/src/PlayerAkm_basm.asm:780
    PLY_AKM_dw PLY_AKM_Track1_PtStartTrack                       
  • polar_dots/src/PlayerAkm_basm.asm:782
    PLY_AKM_dw PLY_AKM_Track1_PtTrack                            
  • polar_dots/src/PlayerAkm_basm.asm:792
    PLY_AKM_dw PLY_AKM_Track1_PtInstrument                       

Functions

Function: CHARS_CTRL_SCREEN_MODE(m) linking/src/demosystem/chars_control.asm:170

Generates list list of character control codes to select screen mode
Show Source
function CHARS_CTRL_SCREEN_MODE m
	assert {m}>=0 && {m}<=2
	return [CHAR_CTRL_SCREEN_MODE, {m}]
endf
Referenced in:

Function: CHARS_CTRL_PEN(p, i1, i2) linking/src/demosystem/chars_control.asm:176

Generates list of character control codes to set ink colors
Show Source
function CHARS_CTRL_PEN p, i1, i2
	return [CHAR_CTRL_PEN, {p}, {i1}, {i2}]
endf

Function: CHARS_CTRL_BORDER(i1, i2) linking/src/demosystem/chars_control.asm:182

Generates list of character control codes to set border colors
Show Source
function CHARS_CTRL_BORDER  i1, i2
	assert {i1} >=0 && {i1} <= 31
	assert {i2} >=0 && {i2} <= 31
	return [CHAR_CTRL_BORDER, {i1}, {i2}]
endf

Function: CHARS_CTRL_SELECT_PEN(pen) linking/src/demosystem/chars_control.asm:189

Generates list list of character control codes to select paper pen
Show Source
function CHARS_CTRL_SELECT_PEN pen
	assert {pen} >= 0 && {pen} <= 15
	return [CHAR_CTRL_PEN, {pen}]
endf
Referenced in:

Function: CHARS_CTRL_PRINT_SYMBOL(sym) linking/src/demosystem/chars_control.asm:195

Generates list list of character control codes to print a symbol
Show Source
function CHARS_CTRL_PRINT_SYMBOL sym
	assert {sym} >= 0 && {sym}<=255
	return [CHAR_CTRL_SOH, {sym}]
endf
Referenced in:

Function: CHARS_CTRL_LOCATE(x, y) linking/src/demosystem/chars_control.asm:201

Generates list list of character control codes to locate the cursor
Show Source
function CHARS_CTRL_LOCATE x, y
	return [CHAR_CTRL_LOCATE, {x}, {y}]
endf
Referenced in:

Function: CRUNCHER_IS_BACKWARD(cruncher) linking/src/demosystem/linker_common.asm:109

Check if {cruncher} is backward capable. In this case it needs to be uncrunched from the end of the file up to the beginning. This allows to overlap crunched and uncrunched code
Show Source
function CRUNCHER_IS_BACKWARD cruncher
		switch {cruncher}
			case CRUNCHER_ZX0_BACKWARD:
				return true
			default
				return false
		endswitch
	endfunction
Referenced in:

Equs

Equ: .palette_adress = $-2 linking/src/load_outer_space.asm:59

Referenced in:
  • linking/src/load_outer_space.asm:76
    ld hl, (.palette_adress)
  • linking/src/load_outer_space.asm:79
    ld (.palette_adress), hl
  • linking/src/load_make_it_easy.asm:138
    ld hl, (.palette_adress)
  • linking/src/load_make_it_easy.asm:141
    ld (.palette_adress), hl

Equ: .wait = $-1 linking/src/load_outer_space.asm:72

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: hbl000_fname_size = $-hbl000_fname linking/src/load_outer_space.asm:98

Equ: hbl001_fname_size = $-hbl001_fname linking/src/load_outer_space.asm:101

Equ: MAKEIT_EASY_LOAD = 0x260 linking/src/load_make_it_easy.asm:1

Referenced in:

Equ: MAKEIT_EASY_EXEC = MAKEIT_EASY_LOAD linking/src/load_make_it_easy.asm:2

Referenced in:

Equ: FIRST_FILE_LEN = list_len(load("HBL.002")) linking/src/load_make_it_easy.asm:6

Referenced in:

Equ: SECOND_FILE_CRTC0_LEN = list_len(load("HBL.007")) linking/src/load_make_it_easy.asm:7

Referenced in:

Equ: SECOND_FILE_CRTC1_LEN = list_len(load("HBL.008")) linking/src/load_make_it_easy.asm:8

Referenced in:

Equ: SECOND_FILE_CRTC2_LEN = list_len(load("HBL.009")) linking/src/load_make_it_easy.asm:9

Referenced in:

Equ: SECOND_FILE_CRTC3_LEN = list_len(load("HBL.010")) linking/src/load_make_it_easy.asm:10

Referenced in:

Equ: SECOND_FILE_CRTC4_LEN = list_len(load("HBL.011")) linking/src/load_make_it_easy.asm:11

Referenced in:

Equ: SECOND_FILE_MAX_LEN = max(SECOND_FILE_CRTC0_LEN,SECOND_FILE_CRTC1_LEN,SECOND_FILE_CRTC2_LEN,SECOND_FILE_CRTC3_LEN, SECOND_FILE_CRTC4_LEN) linking/src/load_make_it_easy.asm:21

Referenced in:

Equ: NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY = MAKEIT_EASY_LOAD + FIRST_FILE_LEN linking/src/load_make_it_easy.asm:67

Referenced in:

Equ: FIRST_PART_COPYING_LEN = 0x8000 - NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY linking/src/load_make_it_easy.asm:71

Referenced in:

Equ: SECOND_FILE_FIRST_PART_DESTINATION = NEXT_COPIED_ADDRESS_IN_MAIN_MEMORY linking/src/load_make_it_easy.asm:72

Referenced in:

Equ: hbl002_fname_size = $-hbl002_fname linking/src/load_make_it_easy.asm:133

Equ: hbl007_fname_size = $-hbl007_fname linking/src/load_make_it_easy.asm:136

Referenced in:

Equ: hbl008_fname_size = $-hbl008_fname linking/src/load_make_it_easy.asm:138

Equ: hbl009_fname_size = $-hbl009_fname linking/src/load_make_it_easy.asm:140

Equ: hbl010_fname_size = $-hbl010_fname linking/src/load_make_it_easy.asm:142

Equ: hbl011_fname_size = $-hbl011_fname linking/src/load_make_it_easy.asm:144

Equ: .palette_adress = $-2 linking/src/load_make_it_easy.asm:158

Referenced in:
  • linking/src/load_outer_space.asm:76
    ld hl, (.palette_adress)
  • linking/src/load_outer_space.asm:79
    ld (.palette_adress), hl
  • linking/src/load_make_it_easy.asm:138
    ld hl, (.palette_adress)
  • linking/src/load_make_it_easy.asm:141
    ld (.palette_adress), hl

Equ: .wait = $-1 linking/src/load_make_it_easy.asm:171

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: SKIP_AMSDOS_LEAVING = false linking/src/hbl.asm:13

Equ: SKIP_INTRODUCTION = false linking/src/hbl.asm:14

Equ: SKIP_POLAR_DOTS = false linking/src/hbl.asm:15

Equ: GREETINGS_TEXT_CENTERED = 0 linking/src/hbl.asm:17

Referenced in:

Equ: GREETINGS_TEXT_LEFT_RIGHT = 1 linking/src/hbl.asm:18

Referenced in:

Equ: GREETINGS_TEXT_LEFT_RIGHT_CENTERED = 2 linking/src/hbl.asm:19

Referenced in:

Equ: GREETINGS_TEXT_LAYOUT = GREETINGS_TEXT_LEFT_RIGHT_CENTERED linking/src/hbl.asm:21

Referenced in:

Equ: REDEFINE_FONT = true linking/src/hbl.asm:23

Equ: .crtc_version_x2 = $-2 linking/src/hbl.asm:147

Referenced in:
  • linking/src/hbl.asm:41
    ld (.crtc_version_x2), a  

Equ: intro_size = $-intro linking/src/hbl.asm:443

Referenced in:

Equ: intro_load = 0x200 linking/src/load_intro.asm:6

Referenced in:
  • linking/src/load_intro.asm:7
    intro_exec equ intro_load
  • linking/src/load_intro.asm:8
    assert $< intro_load

Equ: intro_exec = intro_load linking/src/load_intro.asm:7

Referenced in:

Equ: CHAR_CTRL_NUL = 0 linking/src/demosystem/chars_control.asm:7

No effect. Ignored.

Equ: CHAR_CTRL_SOH = 1 linking/src/demosystem/chars_control.asm:12

Print the symbol given by the parameter value. This allows the symbols in the range 0 to 31 to be displayed. Parameter 0-255 value of the symbol to print
Referenced in:

Equ: CHAR_CTRL_PRINT_SYMBOL = CHAR_CTRL_SOH linking/src/demosystem/chars_control.asm:13

Equ: CHAR_CTRL_STX = 2 linking/src/demosystem/chars_control.asm:16

Turn off text cursor.
Referenced in:

Equ: CHAR_CTRL_CURSOR_OFF = CHAR_CTRL_STX linking/src/demosystem/chars_control.asm:17

Equ: CHAR_CTRL_ETX = 3 linking/src/demosystem/chars_control.asm:20

Turn on text cursor.
Referenced in:

Equ: CHAR_CTRL_CURSOR_ON = CHAR_CTRL_ETX linking/src/demosystem/chars_control.asm:21

Equ: CHAR_CTRL_EOT = 4 linking/src/demosystem/chars_control.asm:26

Set screen mode. Parameter 0,1,2
Referenced in:

Equ: CHAR_CTRL_SCREEN_MODE = CHAR_CTRL_EOT linking/src/demosystem/chars_control.asm:27

Referenced in:

Equ: CHAR_CTRL_ENQ = 5 linking/src/demosystem/chars_control.asm:33

Send the parameter character to the graphics cursor. Parameter 0-255 value of the symbol to print
Referenced in:

Equ: CHAR_CTRL_PRINT_AT_GRAPHICS_CURSOR = CHAR_CTRL_ENQ linking/src/demosystem/chars_control.asm:34

Equ: CHAR_CTRL_ACK = 6 linking/src/demosystem/chars_control.asm:38

Enable Text Screen (see NAK)
Referenced in:

Equ: CHAR_CTRL_ENABLE_TEXT_SCREEN = CHAR_CTRL_ACK linking/src/demosystem/chars_control.asm:39

Equ: CHAR_CTRL_BEL = 7 linking/src/demosystem/chars_control.asm:43

Sound Bleeper. Note that this flushes the sound queues.

Equ: CHAR_CTRL_BS = 8 linking/src/demosystem/chars_control.asm:47

Move cursor back one character

Equ: CHAR_CTRL_TAB = 9 linking/src/demosystem/chars_control.asm:51

Move cursor forward one character.

Equ: CHAR_CTRL_LF = 10 linking/src/demosystem/chars_control.asm:56

Move cursor down one line

Equ: CHAR_CTRL_VT = 11 linking/src/demosystem/chars_control.asm:61

Move cursor up one line

Equ: CHAR_CTRL_FF = 12 linking/src/demosystem/chars_control.asm:66

Clear text window and move cursor to top left corner.
Referenced in:

Equ: CHAR_CTRL_CLS = CHAR_CTRL_FF linking/src/demosystem/chars_control.asm:67

Equ: CHAR_CTRL_CR = 13 linking/src/demosystem/chars_control.asm:72

Move cursor to left edge of window on current line.

Equ: CHAR_CTRL_SO = 14 linking/src/demosystem/chars_control.asm:78

Set Paper Ink parameter paper 0-15
Referenced in:

Equ: CHAR_CTRL_PAPER = CHAR_CTRL_SO linking/src/demosystem/chars_control.asm:79

Equ: CHAR_CTRL_SI = 15 linking/src/demosystem/chars_control.asm:85

Set Pen Ink parameter pen 0-15
Referenced in:

Equ: CHAR_CTRL_PEN = CHAR_CTRL_SI linking/src/demosystem/chars_control.asm:86

Referenced in:
  • linking/src/greetings.asm:8
            db CHAR_CTRL_PEN
  • linking/src/demosystem/chars_control.asm:177
    	return [CHAR_CTRL_PEN, {p}, {i1}, {i2}]
  • linking/src/demosystem/chars_control.asm:191
    	return [CHAR_CTRL_PEN, {pen}]

Equ: CHAR_CTRL_DLE = 16 linking/src/demosystem/chars_control.asm:90

Delete current character

Equ: CHAR_CTRL_DC1 = 17 linking/src/demosystem/chars_control.asm:95

Clear from left edge of window to, and including, the current character position

Equ: CHAR_CTRL_DC2 = 18 linking/src/demosystem/chars_control.asm:99

Clear from, and including, the current character position to the right edge of window.

Equ: CHAR_CTRL_DC3 = 19 linking/src/demosystem/chars_control.asm:103

Clear from start of window to, and including, the current character position.

Equ: CHAR_CTRL_DC4 = 20 linking/src/demosystem/chars_control.asm:107

Clear from, and including, the current character position to the end of window.

Equ: CHAR_CTRL_NAK = 21 linking/src/demosystem/chars_control.asm:112

Turn off text screen. The screen will not react to anything sent to it until after an ACK is sent

Equ: CHAR_CTRL_SYN = 22 linking/src/demosystem/chars_control.asm:117

Set transparency Parameter (0 disables, 1 enables)
Referenced in:

Equ: CHAR_CTRL_TRANSPARENCY = CHAR_CTRL_SYN linking/src/demosystem/chars_control.asm:118

Equ: CHAR_CTRL_ETB = 23 linking/src/demosystem/chars_control.asm:122

Set graphics ink mode. Parameter 0 normal (overwrite), 1 XOR, 2 AND, 3 OR
Referenced in:

Equ: CHAR_CTRL_GRAPHICS_INK_MODE = CHAR_CTRL_ETB linking/src/demosystem/chars_control.asm:123

Equ: CHAR_CTRL_CAN = 24 linking/src/demosystem/chars_control.asm:127

Exchange Pen and Paper Inks, effectively applying the reverse video effect

Equ: CHAR_CTRL_EM = 25 linking/src/demosystem/chars_control.asm:131

Set the matrix for user definable character. The first parameter specifies which character's matrix to set. The next eight specify the matrix.
Referenced in:

Equ: CHAR_CTRL_SYMBOL = CHAR_CTRL_EM linking/src/demosystem/chars_control.asm:132

Equ: CHAR_CTRL_SUB = 26 linking/src/demosystem/chars_control.asm:137

Set Window. The parameters specify left, right, top and bottom edges of the window. Parameters 1-80, 1-80, 1-25, 1-25
Referenced in:

Equ: CHAR_CTRL_WINDOW = CHAR_CTRL_SUB linking/src/demosystem/chars_control.asm:138

Equ: CHAR_CTRL_ESC = 27 linking/src/demosystem/chars_control.asm:143

No effect. Ignored.

Equ: CHAR_CTRL_FS = 28 linking/src/demosystem/chars_control.asm:148

Set Ink to a pair of colors. The first parameter specifies the Ink, the next two the required colors Parameters 0-15, 0-31, 0-31
Referenced in:

Equ: CHAR_CTRL_INK = CHAR_CTRL_FS linking/src/demosystem/chars_control.asm:149

Equ: CHAR_CTRL_GS = 29 linking/src/demosystem/chars_control.asm:154

Set Border to a pair of colors. Equivalent to a BORDER command. The two parameters specify the two colors. Parameters 0-31, 0-31
Referenced in:

Equ: CHAR_CTRL_BORDER = CHAR_CTRL_GS linking/src/demosystem/chars_control.asm:155

Referenced in:
  • linking/src/demosystem/chars_control.asm:185
    	return [CHAR_CTRL_BORDER, {i1}, {i2}]

Equ: CHAR_CTRL_RS = 30 linking/src/demosystem/chars_control.asm:159

Move cursor to top left hand corner of window.

Equ: CHAR_CTRL_US = 31 linking/src/demosystem/chars_control.asm:165

Move cursor to the given position in the current window. The first parameter gives the column to move to, the second gives the line. Parameters 1-80, 1-25
Referenced in:

Equ: CHAR_CTRL_LOCATE = CHAR_CTRL_US linking/src/demosystem/chars_control.asm:166

Referenced in:
  • linking/src/demosystem/chars_control.asm:202
    	return [CHAR_CTRL_LOCATE, {x}, {y}]

Equ: USE_CPCBOOSTER = true linking/src/demosystem/demosystem_config.asm:1

Referenced in:

Equ: USE_BASIC_TIMER = true linking/src/demosystem/demosystem_config.asm:2

Referenced in:

Equ: __AMSDOS_STATIC_DATA_ADDRESS__ = &be40 linking/src/demosystem/private.asm:25

Referenced in:

Equ: __AMSDOS_STATIC_DATA_SIZE__ = &40 linking/src/demosystem/private.asm:26

Referenced in:

Equ: __AMSDOS_DYNAMIC_DATA_ADDRESS_PTR__ = &be7d linking/src/demosystem/private.asm:27

Referenced in:

Equ: __AMSDOS_DYNAMIC_DATA_SIZE__ = &500 linking/src/demosystem/private.asm:28

Referenced in:

Equ: __FIRMWARE_DATA_START__ = &a800 linking/src/demosystem/private.asm:29

Referenced in:

Equ: __FIRMWARE_DATA_END__ = &be00 linking/src/demosystem/private.asm:30

Referenced in:

Equ: __FIRMWARE_DATA_SIZE__ = __FIRMWARE_DATA_END__ - __FIRMWARE_DATA_START__ linking/src/demosystem/private.asm:31

Referenced in:

Equ: __STACK_SIZE__ = 2*40 linking/src/demosystem/private.asm:34

Referenced in:

Equ: __FIRMWARE_STORAGE_SIZE__ = __FIRMWARE_DATA_SIZE__ + __AMSDOS_STATIC_DATA_SIZE__ + __AMSDOS_DYNAMIC_DATA_SIZE__ linking/src/demosystem/private.asm:35

Referenced in:

Equ: __DS_BUFFER_CAS_IN__ = &170 linking/src/demosystem/private.asm:38

Referenced in:

Equ: __DS_FILENAME__ = __DS_BUFFER_CAS_IN__ linking/src/demosystem/private.asm:39

Referenced in:

Equ: __DS_FILENAME_SIZE__ = __DS_FILENAME__ + 256 linking/src/demosystem/private.asm:42

Referenced in:

Equ: __DS_LOAD_ADDRESS__ = __DS_FILENAME_SIZE__ + 1 linking/src/demosystem/private.asm:45

Referenced in:

Equ: __DS_FNAME_BUFFER_SIZE = (__DS_LOAD_ADDRESS__+2) - __DS_BUFFER_CAS_IN__ linking/src/demosystem/private.asm:46

Referenced in:

Equ: __DS_TRUE_FIRST_AVAILABLE_ADDRESS = __DS_FNAME_BUFFER_SIZE + __DS_BUFFER_CAS_IN__ linking/src/demosystem/private.asm:48

Referenced in:

Equ: __DS_STACK__ = &C000 linking/src/demosystem/private.asm:51

Referenced in:

Equ: __COPY_BUFFER__ = &c000 linking/src/demosystem/private.asm:52

Referenced in:

Equ: __COPY_BUFFER_SIZE__ = &2000 linking/src/demosystem/private.asm:53

Referenced in:

Equ: __MODE_NUMBER_PTR_6128__ = 0xB7C3 linking/src/demosystem/private.asm:55

Referenced in:

Equ: __MODE_NUMBER_PTR_464__ = 0xB1C8 linking/src/demosystem/private.asm:56

Equ: __DS_DEVICE_UNSET__ = 0 linking/src/demosystem/private.asm:58

Equ: __DS_DEVICE_FLOPPY_DRIVE__ = 1 linking/src/demosystem/private.asm:59

Equ: __DS_DEVICE_ALBIREO_LIKE__ = 2 linking/src/demosystem/private.asm:60

Equ: MAKE_FIRMWARE_SILENT = false linking/src/demosystem/private.asm:62

Equ: DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_SIZE = 1 linking/src/demosystem/private.asm:145

Equ: DS_PRIVATE_BOOSTER_COMMUNICATION_FILE_HALTS = 2 linking/src/demosystem/private.asm:146

Equ: .file_size = $-2 linking/src/demosystem/private.asm:250

Referenced in:
  • linking/src/demosystem/private.asm:157
    ld (.file_size), bc
  • linking/src/demosystem/private.asm:445
    ld (.file_size), bc

Equ: .file_size = $-2 linking/src/demosystem/private.asm:614

Referenced in:
  • linking/src/demosystem/private.asm:157
    ld (.file_size), bc
  • linking/src/demosystem/private.asm:445
    ld (.file_size), bc

Equ: __ds_bootstrap_filename_size__ = __ds_bootstrap_filename__ + 256 linking/src/demosystem/private.asm:632

Referenced in:

Equ: __ds_bootstrap_load_address__ = __ds_bootstrap_filename_size__ + 1 linking/src/demosystem/private.asm:635

Referenced in:

Equ: __ds_bootstrap_program_stack_backup__ = __ds_bootstrap_load_address__ + 2 linking/src/demosystem/private.asm:638

Referenced in:

Equ: __ds_demosystem_bootstrap_stack_backup__ = __ds_bootstrap_program_stack_backup__ + 2 linking/src/demosystem/private.asm:639

Referenced in:

Equ: __ds_save_buffer__ = __ds_demosystem_bootstrap_stack_backup__ + 2 linking/src/demosystem/private.asm:644

Referenced in:

Equ: __ds_save_buffer_end__ = __ds_save_buffer__ + __FIRMWARE_STORAGE_SIZE__ linking/src/demosystem/private.asm:645

Referenced in:

Equ: FirmwarePackAddress = __ds_save_buffer__ linking/src/demosystem/private.asm:647

Equ: __ds_bootstrap_stack__ = __ds_save_buffer_end__ + __STACK_SIZE__ linking/src/demosystem/private.asm:652

Referenced in:

Equ: DS_MAIN_SPACE_GA = 0xc0 linking/src/demosystem/public.asm:13

Referenced in:

Equ: DS_BOOTSTRAP_DS_SPACE_GA = 0xc1 linking/src/demosystem/public.asm:14

Referenced in:

Equ: DS_FULL_SPACE_GA = 0xc2 linking/src/demosystem/public.asm:15

Referenced in:

Equ: DS_LOADER_OPTION_NONE = 0 linking/src/demosystem/public.asm:17

Equ: DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_ON = (1<<0) linking/src/demosystem/public.asm:18

Referenced in:

Equ: DS_LOADER_OPTION_REQUEST_DRIVE_MOTOR_OFF = (1<<1) linking/src/demosystem/public.asm:19

Referenced in:

Equ: __DS_FILE_LOADING_ROUTINE__ = &e000 + 0*3 linking/src/demosystem/public.asm:22

Referenced in:

Equ: __DS_BACKUP_FIRMWARE_ROUTINE__ = &e000 + 1*3 linking/src/demosystem/public.asm:23

Referenced in:

Equ: __DS_SAVE_SCREEN_MODE__ = &e000 + 2*3 linking/src/demosystem/public.asm:24

Referenced in:

Equ: __DS_COPY_FROM_EXTRA_TO_MAIN__ = &e000 + 3*3 linking/src/demosystem/public.asm:25

Referenced in:

Equ: DS_LOAD_ADDRESS = __DS_FILE_LOADING_ROUTINE__ linking/src/demosystem/public.asm:27

Referenced in:
  • linking/src/demosystem/public.asm:22
    DS_LOAD_ADDRESS_FROM_DEMO_SPACE = DS_LOAD_ADDRESS % 0x4000 + 0x4000 
  • linking/src/demosystem/public.asm:114
            call DS_LOAD_ADDRESS

Equ: DS_FIRST_AVAILABLE_ADDRESS = &300 linking/src/demosystem/public.asm:32

The minmum address available to load a file in the main memory.
Referenced in:

Equ: __DS_FIRST_BANK_SIZE__ = &4000 - DS_FIRST_AVAILABLE_ADDRESS linking/src/demosystem/public.asm:33

Equ: polar_loader_load = 0x180 linking/src/load_outer_space_loader.asm:13

Referenced in:
  • linking/src/load_outer_space_loader.asm:13
    assert $< polar_loader_load

Equ: polar_loader_exec = 0x180 linking/src/load_outer_space_loader.asm:14

Referenced in:

Equ: intro_loader_load = 0x200 linking/src/load_intro_loader.asm:6

Referenced in:

Equ: intro_loader_exec = intro_loader_load linking/src/load_intro_loader.asm:7

Referenced in:

Equ: SCREEN_MAXIMUM_DURATION = 5*50*60 linking/src/limited_duration.asm:2

Referenced in:

Equ: makeit_loader_load = 0x180 linking/src/load_make_it_easy_loader.asm:8

Referenced in:
  • linking/src/load_make_it_easy_loader.asm:8
    assert $< makeit_loader_load

Equ: makeit_loader_exec = 0x180 linking/src/load_make_it_easy_loader.asm:9

Referenced in:

Equ: LOAD_THE_LOADER = false IntroHBL/src/intro_code.asm:3

Equ: SELECTED_CRTC = 1 IntroHBL/src/intro_code.asm:4

Referenced in:

Equ: HEIGHT_HBL_FLASH = 48 IntroHBL/src/intro_code.asm:6

Referenced in:

Equ: HEIGHT_HBL_MAIN = 48+4-1+10-3-12 IntroHBL/src/intro_code.asm:7

Referenced in:

Equ: HEIGHT_HBL_HORNY = 22 IntroHBL/src/intro_code.asm:8

Referenced in:

Equ: HEIGHT_HBL_HORNY2 = 10+4 IntroHBL/src/intro_code.asm:9

Referenced in:

Equ: HEIGHT_HBL_HORNY3 = 6+1 IntroHBL/src/intro_code.asm:10

Referenced in:

Equ: HEIGHT_HBL_BYTES = 30+6-1-1 IntroHBL/src/intro_code.asm:11

Referenced in:

Equ: HEIGHT_HBL_BYTES2 = 6-1 IntroHBL/src/intro_code.asm:12

Referenced in:

Equ: SPRITE_VIDE = &4000 IntroHBL/src/intro_code.asm:15

Referenced in:

Equ: MODE2 = &8E IntroHBL/src/intro_code.asm:16

Referenced in:
  • IntroHBL/src/intro_code.asm:2759
    defb MODE2,1 
  • IntroHBL/src/intro_code.asm:2770
    defb MODE2,1  
  • IntroHBL/src/intro_code.asm:2779
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2787
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2795
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2803
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2811
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2819
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2827
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2835
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2844
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2853
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2861
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2869
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2878
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2886
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2894
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2902
    defb MODE2,1   
  • MakeItEasy/src/effets_scenario.asm:523
    ld l,MODE2

Equ: MODE0 = &8C IntroHBL/src/intro_code.asm:17

Referenced in:
  • IntroHBL/src/intro_code.asm:2763
    defb MODE0,1  
  • IntroHBL/src/intro_code.asm:2774
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2783
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2791
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2799
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2807
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2815
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2823
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2831
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2839
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2848
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2857
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2865
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2873
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2882
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2890
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2898
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2906
    defb MODE0,1   
  • IntroHBL/src/intro_code.asm:2911
    defb MODE0,10   

Equ: R1 = 48 IntroHBL/src/intro_code.asm:18

Referenced in:
  • IntroHBL/src/intro_code.asm:22
    SCREEN_WIDTH 	equ R1*2
  • IntroHBL/src/intro_code.asm:902
    DB 	1,R1 
  • IntroHBL/src/intro_code.asm:912
    DB 	1,R1 
  • IntroHBL/src/intro_code.asm:920
    DB 	1,R1 
  • IntroHBL/src/intro_code.asm:929
    DB 	1,R1 

Equ: R2 = &32 IntroHBL/src/intro_code.asm:19

Referenced in:
  • IntroHBL/src/intro_code.asm:904
    DB	2,R2
  • IntroHBL/src/intro_code.asm:913
    DB	2,R2
  • IntroHBL/src/intro_code.asm:921
    DB	2,R2
  • IntroHBL/src/intro_code.asm:931
    DB	2,R2
  • polar_dots/src/polar.asm:102
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:129
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:156
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:183
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:208
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:233
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:258
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:283
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:308
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:333
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:358
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:384
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:409
    		out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:434
    	out (c),l   ; envoie valeur R2 &2E
  • polar_dots/src/polar.asm:459
    		out (c),l   ; envoie valeur R2 &2E
Referenced in:
  • IntroHBL/src/intro_code.asm:941
    DB	2,R2_LOGO
  • IntroHBL/src/intro_code.asm:2167
    ld hl,&1800+R2_LOGO

Equ: SCREEN_WIDTH = R1*2 IntroHBL/src/intro_code.asm:21

Referenced in:

Equ: TABLINE_96 = END_CODE IntroHBL/src/intro_code.asm:22

Referenced in:
  • IntroHBL/src/intro_code.asm:143
    ld hl,TABLINE_96+120
  • IntroHBL/src/intro_code.asm:147
    ld hl,TABLINE_96+120
  • IntroHBL/src/intro_code.asm:151
    ld hl,TABLINE_96+240-16+8
  • IntroHBL/src/intro_code.asm:262
    ld hl,TABLINE_96+120+2-2
  • IntroHBL/src/intro_code.asm:269
    ld hl,TABLINE_96+120-2
  • IntroHBL/src/intro_code.asm:338
    ld hl,TABLINE_96+120
  • IntroHBL/src/intro_code.asm:1043
    LD iy,TABLINE_96
  • IntroHBL/src/intro_code.asm:1129
    ld sp,TABLINE_96+100+8
  • IntroHBL/src/intro_code.asm:1150
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1174
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1196
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1222
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1245
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1272
    ld sp,TABLINE_96
  • IntroHBL/src/intro_code.asm:1392
    ld hl,TABLINE_96
  • IntroHBL/src/intro_code.asm:1429
    ld hl,TABLINE_96

Equ: TABLINE_80 = END_CODE+&200 IntroHBL/src/intro_code.asm:23

Referenced in:
  • IntroHBL/src/rain.asm:52
    ld hl,TABLINE_80
  • IntroHBL/src/intro_code.asm:90
    ld de,TABLINE_80+2
  • IntroHBL/src/intro_code.asm:91
    ld (TABLINE_80),hl
  • IntroHBL/src/intro_code.asm:92
    ld hl,TABLINE_80
  • IntroHBL/src/intro_code.asm:606
    ld hl,TABLINE_80+220+40+12+2+4
  • IntroHBL/src/intro_code.asm:624
    ld hl,TABLINE_80+220+40+12+26+2+4
  • IntroHBL/src/intro_code.asm:643
    ld hl,TABLINE_80+220+40+12+26+24+2+4
  • IntroHBL/src/intro_code.asm:783
    ld hl,TABLINE_80+220+40+12+12+2+8-6
  • IntroHBL/src/intro_code.asm:796
    ld hl,TABLINE_80+220+40+12+12+2
  • IntroHBL/src/intro_code.asm:814
    ld hl,TABLINE_80+220+40+12+12+2+8-6+6-2
  • IntroHBL/src/intro_code.asm:1073
    LD iy,TABLINE_80
  • IntroHBL/src/intro_code.asm:2086
    ld hl,TABLINE_80+16-8
  • IntroHBL/src/intro_code.asm:2101
    ld hl,TABLINE_80
  • IntroHBL/src/intro_code.asm:2115
    ld hl,TABLINE_80+60+50-20-2-2+4+2
  • IntroHBL/src/intro_code.asm:2129
    ld hl,TABLINE_80+60+50-20-2-2+4-2
  • IntroHBL/src/intro_code.asm:2155
    ld hl,TABLINE_80+300-2

Equ: SPRWIDTH = 16 IntroHBL/src/intro_code.asm:24

Equ: SPRHEIGHT = 48 IntroHBL/src/intro_code.asm:25

Referenced in:
  • IntroHBL/src/intro_code.asm:1357
    repeat SPRHEIGHT-2
    ;	
    	ex de,hl
    	pop hl
    
    	ld c,a
    	ld b,0
    	add hl,bc	
    	ex de,hl
    
    ;
    	repeat SPRWIDTH
    	...

Equ: WIDTH_OVERS = 34 IntroHBL/src/intro_code.asm:26

Referenced in:

Equ: BORDER_TOP = 93 IntroHBL/src/intro_code.asm:29

Referenced in:

Equ: BORDER_BOTTOM = 88 IntroHBL/src/intro_code.asm:30

Referenced in:

Equ: INK0 = 84 IntroHBL/src/intro_code.asm:32

Referenced in:
  • IntroHBL/src/intro_code.asm:2718
    defb INK0,BORDER_BOTTOM
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: INK1 = BORDER_BOTTOM IntroHBL/src/intro_code.asm:33

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: INK1_FLASH = 95 IntroHBL/src/intro_code.asm:34

Referenced in:
  • IntroHBL/src/intro_code.asm:210
    ld hl,&0100+INK1_FLASH

Equ: BLACK = 84 IntroHBL/src/intro_code.asm:36

Referenced in:

Equ: RASTER_TOP_BOTTOM = BORDER_TOP*256+BORDER_BOTTOM IntroHBL/src/intro_code.asm:40

Referenced in:

Equ: RASTER_BOTTOM_TOP = BORDER_BOTTOM*256+BORDER_TOP IntroHBL/src/intro_code.asm:41

Referenced in:

Equ: RASTER_TOP_TOP = BORDER_TOP*256+BORDER_TOP IntroHBL/src/intro_code.asm:42

Referenced in:

Equ: BK_MUSIC = &c6 IntroHBL/src/intro_code.asm:44

Referenced in:
  • IntroHBL/src/intro_code.asm:98
    ld bc,&7f00+BK_MUSIC
  • IntroHBL/src/intro_code.asm:950
    ld bc,&7f00+BK_MUSIC

Equ: RestoreSp = $+1 IntroHBL/src/intro_code.asm:1021

Referenced in:
  • IntroHBL/src/intro_code.asm:952
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8.asm:108
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8_BAK.asm:217
    ld	(RestoreSp), sp

Equ: POSXH = 30-5 IntroHBL/src/intro_code.asm:2738

Referenced in:
  • IntroHBL/src/intro_code.asm:2761
    defb POSXH,POSXL
  • IntroHBL/src/intro_code.asm:2765
    defb POSXH,POSXL            
  • IntroHBL/src/intro_code.asm:2772
    defb POSXH-1,POSXL+1
  • IntroHBL/src/intro_code.asm:2776
    defb POSXH-1,POSXL+1        
  • IntroHBL/src/intro_code.asm:2781
    defb POSXH-2,POSXL+2
  • IntroHBL/src/intro_code.asm:2785
    defb POSXH-2,POSXL+2          
  • IntroHBL/src/intro_code.asm:2789
    defb POSXH-3,POSXL+3
  • IntroHBL/src/intro_code.asm:2793
    defb POSXH-3,POSXL+3       
  • IntroHBL/src/intro_code.asm:2797
    defb POSXH-4,POSXL+4
  • IntroHBL/src/intro_code.asm:2801
    defb POSXH-4,POSXL+4     
  • IntroHBL/src/intro_code.asm:2805
    defb POSXH-5,POSXL+5
  • IntroHBL/src/intro_code.asm:2809
    defb POSXH-5,POSXL+5        			
  • IntroHBL/src/intro_code.asm:2813
    defb POSXH-6,POSXL+6
  • IntroHBL/src/intro_code.asm:2817
    defb POSXH-6,POSXL+6        
  • IntroHBL/src/intro_code.asm:2821
    defb POSXH-7,POSXL+7
  • IntroHBL/src/intro_code.asm:2825
    defb POSXH-7,POSXL+7       
  • IntroHBL/src/intro_code.asm:2829
    defb POSXH-8,POSXL+8
  • IntroHBL/src/intro_code.asm:2833
    defb POSXH-8,POSXL+8      
  • IntroHBL/src/intro_code.asm:2837
    defb POSXH-9,POSXL+9
  • IntroHBL/src/intro_code.asm:2841
    defb POSXH-9,POSXL+9     
  • IntroHBL/src/intro_code.asm:2846
    defb POSXH-10,POSXL+10
  • IntroHBL/src/intro_code.asm:2850
    defb POSXH-10,POSXL+10     
  • IntroHBL/src/intro_code.asm:2855
    defb POSXH-11,POSXL+11
  • IntroHBL/src/intro_code.asm:2859
    defb POSXH-11,POSXL+11   
  • IntroHBL/src/intro_code.asm:2863
    defb POSXH-12,POSXL+12
  • IntroHBL/src/intro_code.asm:2867
    defb POSXH-12,POSXL+12  
  • IntroHBL/src/intro_code.asm:2871
    defb POSXH-13,POSXL+13
  • IntroHBL/src/intro_code.asm:2875
    defb POSXH-13,POSXL+13  
  • IntroHBL/src/intro_code.asm:2880
    defb POSXH-14,POSXL+14
  • IntroHBL/src/intro_code.asm:2884
    defb POSXH-14,POSXL+14  
  • IntroHBL/src/intro_code.asm:2888
    defb POSXH-15,POSXL+15
  • IntroHBL/src/intro_code.asm:2892
    defb POSXH-15,POSXL+15  
  • IntroHBL/src/intro_code.asm:2896
    defb POSXH-16,POSXL+16
  • IntroHBL/src/intro_code.asm:2900
    defb POSXH-16,POSXL+16  
  • IntroHBL/src/intro_code.asm:2904
    defb POSXH-17,POSXL+17
  • IntroHBL/src/intro_code.asm:2908
    defb POSXH-17,POSXL+17 
  • IntroHBL/src/intro_code.asm:2913
    defb POSXH-17,POSXL+17 

Equ: POSXL = 50+4 IntroHBL/src/intro_code.asm:2739

Referenced in:
  • IntroHBL/src/intro_code.asm:2761
    defb POSXH,POSXL
  • IntroHBL/src/intro_code.asm:2765
    defb POSXH,POSXL            
  • IntroHBL/src/intro_code.asm:2772
    defb POSXH-1,POSXL+1
  • IntroHBL/src/intro_code.asm:2776
    defb POSXH-1,POSXL+1        
  • IntroHBL/src/intro_code.asm:2781
    defb POSXH-2,POSXL+2
  • IntroHBL/src/intro_code.asm:2785
    defb POSXH-2,POSXL+2          
  • IntroHBL/src/intro_code.asm:2789
    defb POSXH-3,POSXL+3
  • IntroHBL/src/intro_code.asm:2793
    defb POSXH-3,POSXL+3       
  • IntroHBL/src/intro_code.asm:2797
    defb POSXH-4,POSXL+4
  • IntroHBL/src/intro_code.asm:2801
    defb POSXH-4,POSXL+4     
  • IntroHBL/src/intro_code.asm:2805
    defb POSXH-5,POSXL+5
  • IntroHBL/src/intro_code.asm:2809
    defb POSXH-5,POSXL+5        			
  • IntroHBL/src/intro_code.asm:2813
    defb POSXH-6,POSXL+6
  • IntroHBL/src/intro_code.asm:2817
    defb POSXH-6,POSXL+6        
  • IntroHBL/src/intro_code.asm:2821
    defb POSXH-7,POSXL+7
  • IntroHBL/src/intro_code.asm:2825
    defb POSXH-7,POSXL+7       
  • IntroHBL/src/intro_code.asm:2829
    defb POSXH-8,POSXL+8
  • IntroHBL/src/intro_code.asm:2833
    defb POSXH-8,POSXL+8      
  • IntroHBL/src/intro_code.asm:2837
    defb POSXH-9,POSXL+9
  • IntroHBL/src/intro_code.asm:2841
    defb POSXH-9,POSXL+9     
  • IntroHBL/src/intro_code.asm:2846
    defb POSXH-10,POSXL+10
  • IntroHBL/src/intro_code.asm:2850
    defb POSXH-10,POSXL+10     
  • IntroHBL/src/intro_code.asm:2855
    defb POSXH-11,POSXL+11
  • IntroHBL/src/intro_code.asm:2859
    defb POSXH-11,POSXL+11   
  • IntroHBL/src/intro_code.asm:2863
    defb POSXH-12,POSXL+12
  • IntroHBL/src/intro_code.asm:2867
    defb POSXH-12,POSXL+12  
  • IntroHBL/src/intro_code.asm:2871
    defb POSXH-13,POSXL+13
  • IntroHBL/src/intro_code.asm:2875
    defb POSXH-13,POSXL+13  
  • IntroHBL/src/intro_code.asm:2880
    defb POSXH-14,POSXL+14
  • IntroHBL/src/intro_code.asm:2884
    defb POSXH-14,POSXL+14  
  • IntroHBL/src/intro_code.asm:2888
    defb POSXH-15,POSXL+15
  • IntroHBL/src/intro_code.asm:2892
    defb POSXH-15,POSXL+15  
  • IntroHBL/src/intro_code.asm:2896
    defb POSXH-16,POSXL+16
  • IntroHBL/src/intro_code.asm:2900
    defb POSXH-16,POSXL+16  
  • IntroHBL/src/intro_code.asm:2904
    defb POSXH-17,POSXL+17
  • IntroHBL/src/intro_code.asm:2908
    defb POSXH-17,POSXL+17 
  • IntroHBL/src/intro_code.asm:2913
    defb POSXH-17,POSXL+17 

Equ: c0_800_length = c0_800_stop - c0_800_start IntroHBL/src/intro.asm:46

Equ: c0_8000_length = $-c0_8000_start IntroHBL/src/intro.asm:55

Equ: c6_length = c6_stop - c6_start IntroHBL/src/intro.asm:83

Referenced in:
  • IntroHBL/src/intro.asm:97
    assert c6_length <= 0x4000

Equ: BuffSize = #B42 IntroHBL/src/music.asm:1

Referenced in:

Equ: FapBuff = #6000 IntroHBL/src/music.asm:3

Referenced in:

Equ: HiFapBuff = hi(FapBuff) IntroHBL/src/music.asm:4

Referenced in:
  • IntroHBL/src/intro_code.asm:102
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8.asm:38
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8_BAK.asm:78
    ld	a,HiFapBuff 	

Equ: PlayerSize = FapData - FapPlay IntroHBL/src/music.asm:9

Referenced in:

Equ: .palette_address = $-2 IntroHBL/src/intro_loader.asm:75

Referenced in:
  • IntroHBL/src/intro_loader.asm:71
    ld hl, (.palette_address)
  • IntroHBL/src/intro_loader.asm:74
    ld (.palette_address), hl
  • polar_dots/src/polar_loader.asm:71
    ld hl, (.palette_address)
  • polar_dots/src/polar_loader.asm:74
    ld (.palette_address), hl
  • MakeItEasy/src/loading_screen.asm:62
    ld hl, (.palette_address)
  • MakeItEasy/src/loading_screen.asm:65
    ld (.palette_address), hl

Equ: .wait = $-1 IntroHBL/src/intro_loader.asm:80

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: PLY_AKM_STOP_SOUNDS = 1 polar_dots/src/music_akm.asm:28

Equ: PLY_AKM_Data_OffsetWaitEmptyCell = PLY_AKM_Track1_WaitEmptyCell - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2113

Referenced in:

Equ: PLY_AKM_Data_OffsetPtStartTrack = PLY_AKM_Track1_PtStartTrack - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2117

Equ: PLY_AKM_Data_OffsetPtTrack = PLY_AKM_Track1_PtTrack - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2118

Referenced in:

Equ: PLY_AKM_Data_OffsetBaseNote = PLY_AKM_Track1_BaseNote - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2119

Equ: PLY_AKM_Data_OffsetEscapeNote = PLY_AKM_Track1_EscapeNote - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2120

Referenced in:

Equ: PLY_AKM_Data_OffsetEscapeInstrument = PLY_AKM_Track1_EscapeInstrument - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2121

Referenced in:

Equ: PLY_AKM_Data_OffsetEscapeWait = PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2122

Referenced in:

Equ: PLY_AKM_Data_OffsetSecondaryInstrument = PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2123

Equ: PLY_AKM_Data_OffsetPtInstrument = PLY_AKM_Track1_PtInstrument - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2124

Referenced in:

Equ: PLY_AKM_Data_OffsetInstrumentCurrentStep = PLY_AKM_Track1_InstrumentCurrentStep - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2125

Equ: PLY_AKM_Data_OffsetInstrumentSpeed = PLY_AKM_Track1_InstrumentSpeed - PLY_AKM_Track1_Data polar_dots/src/PlayerAkmDevelop.asm:2126

Equ: PLY_AKM_Track2_WaitEmptyCell = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetWaitEmptyCell polar_dots/src/PlayerAkmDevelop.asm:2170

Referenced in:

Equ: PLY_AKM_Track2_PtTrack = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtTrack polar_dots/src/PlayerAkmDevelop.asm:2171

Equ: PLY_AKM_Track2_PtInstrument = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtInstrument polar_dots/src/PlayerAkmDevelop.asm:2172

Referenced in:

Equ: PLY_AKM_Track2_EscapeNote = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeNote polar_dots/src/PlayerAkmDevelop.asm:2173

Referenced in:

Equ: PLY_AKM_Track2_EscapeInstrument = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeInstrument polar_dots/src/PlayerAkmDevelop.asm:2174

Referenced in:

Equ: PLY_AKM_Track2_EscapeWait = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeWait polar_dots/src/PlayerAkmDevelop.asm:2175

Referenced in:

Equ: PLY_AKM_Track3_WaitEmptyCell = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetWaitEmptyCell polar_dots/src/PlayerAkmDevelop.asm:2202

Referenced in:

Equ: PLY_AKM_Track3_PtTrack = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtTrack polar_dots/src/PlayerAkmDevelop.asm:2203

Equ: PLY_AKM_Track3_PtInstrument = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtInstrument polar_dots/src/PlayerAkmDevelop.asm:2204

Referenced in:

Equ: PLY_AKM_Track3_EscapeNote = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeNote polar_dots/src/PlayerAkmDevelop.asm:2205

Referenced in:

Equ: PLY_AKM_Track3_EscapeInstrument = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeInstrument polar_dots/src/PlayerAkmDevelop.asm:2206

Referenced in:

Equ: PLY_AKM_Track3_EscapeWait = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeWait polar_dots/src/PlayerAkmDevelop.asm:2207

Referenced in:

Equ: PLY_AKM_Registers_OffsetVolume = PLY_AKM_Track1_Volume - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkmDevelop.asm:2319

Equ: PLY_AKM_Registers_OffsetSoftwarePeriodLSB = PLY_AKM_Track1_SoftwarePeriodLSB - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkmDevelop.asm:2320

Equ: PLY_AKM_Registers_OffsetSoftwarePeriodMSB = PLY_AKM_Track1_SoftwarePeriodMSB - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkmDevelop.asm:2321

Equ: .wait = $-2 polar_dots/src/scenario.asm:4

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: .table = $-2 polar_dots/src/scenario.asm:24

Referenced in:
  • polar_dots/src/scenario.asm:32
    ld (.table), hl

Equ: NB_CIRCLES_TO_DRAW = 35 polar_dots/src/polar.asm:5

Referenced in:

Equ: DO_ERASE = true polar_dots/src/polar.asm:6

Equ: DO_MULTIMODE = true polar_dots/src/polar.asm:7

Equ: MAX_AMOUNT_TO_RECOVER = 70 polar_dots/src/polar.asm:8

Equ: RASTER_PEN = 1 polar_dots/src/polar.asm:9

Referenced in:
  • polar_dots/src/polar.asm:78
    ld bc, 0x7f00 + RASTER_PEN 
  • polar_dots/src/polar.asm:86
    ld bc, 0x7f00 + RASTER_PEN 
  • polar_dots/src/polar.asm:92
    ld bc, 0x7f00 + RASTER_PEN 
  • polar_dots/src/polar.asm:99
    ld bc, 0x7f00 + RASTER_PEN 
  • polar_dots/src/polar.asm:121
    ld bc, 0x7f00 + RASTER_PEN 

Equ: REG2_VALUE_FOR_HBL_BOTTOM_CRTC34 = 32-1-1 polar_dots/src/polar.asm:13

RASTER_INKS = [91, 67, 91, 67, 78] ; inks with the GA format
Referenced in:

Equ: REG2_VALUE_FOR_HBL_TOP_CRTC34 = 15-1 polar_dots/src/polar.asm:14

Referenced in:

Equ: HEIGHT_AT_XPOS32 = 16/2-1 polar_dots/src/polar.asm:16

Referenced in:

Equ: HEIGHT_AT_XPOS31 = 12/2-1 polar_dots/src/polar.asm:17

Referenced in:

Equ: HEIGHT_AT_XPOS30 = 10/2 polar_dots/src/polar.asm:18

Referenced in:

Equ: HEIGHT_AT_XPOS29 = 6/2+1+1 polar_dots/src/polar.asm:19

Referenced in:

Equ: HEIGHT_AT_XPOS28 = 5/2+1 polar_dots/src/polar.asm:20

Referenced in:

Equ: HEIGHT_AT_XPOS27 = 4/2+1 polar_dots/src/polar.asm:21

Referenced in:

Equ: HEIGHT_AT_XPOS26 = 3/2-1-1 polar_dots/src/polar.asm:22

Referenced in:

Equ: HEIGHT_AT_XPOS25 = 3/2 polar_dots/src/polar.asm:23

Referenced in:

Equ: CRTC_REG3_DEFAULT_VALUE = &8e polar_dots/src/polar.asm:25

Referenced in:

Equ: CRTC_REG2_VALUE = &2e polar_dots/src/polar.asm:26

Referenced in:

Equ: Reg2 = CRTC_REG2_VALUE polar_dots/src/polar.asm:27

Referenced in:
  • polar_dots/src/multi_mode.asm:42
    ld a,Reg2
  • polar_dots/src/multi_mode.asm:356
    ld l,Reg2
  • MakeItEasy/src/multimoderupture8.asm:70
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8.asm:339
    ld hl,8*256+Reg2
  • MakeItEasy/src/exit.asm:11
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:115
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:383
    ld l,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2

Equ: .angle_curve2ptr = $ - 2 polar_dots/src/polar.asm:754

Referenced in:
  • polar_dots/src/polar.asm:247
    ld (.angle_curve2ptr), hl
  • polar_dots/src/polar.asm:257
    ld (.angle_curve2ptr), hl
  • polar_dots/src/polar.asm:259
    ld hl, (.angle_curve2ptr)

Equ: .angle_curve2_endptr = $-2 polar_dots/src/polar.asm:759

Equ: .angle_curve2ptr2 = $ - 2 polar_dots/src/polar.asm:764

Equ: .angle_curve1ptr = $ - 2 polar_dots/src/polar.asm:774

Referenced in:
  • polar_dots/src/polar.asm:269
    ld (.angle_curve1ptr), de

Equ: .radus_curve1 = $-2 polar_dots/src/polar.asm:787

Referenced in:
  • polar_dots/src/polar.asm:280
    ld (.radus_curve1), iy

Equ: .radus_curve2 = $-2 polar_dots/src/polar.asm:789

Referenced in:
  • polar_dots/src/polar.asm:281
    ld (.radus_curve2), ix

Equ: .restore_sp = $-2 polar_dots/src/polar.asm:847

Referenced in:
  • polar_dots/src/polar.asm:233
    ld (.restore_sp), sp
  • polar_dots/src/polar.asm:295
    ld (.restore_sp), sp

Equ: .start_buffer = $ -2 polar_dots/src/polar.asm:863

Equ: .restore_sp = $-2 polar_dots/src/polar.asm:878

Referenced in:
  • polar_dots/src/polar.asm:233
    ld (.restore_sp), sp
  • polar_dots/src/polar.asm:295
    ld (.restore_sp), sp

Equ: HEIGHT_AT_XPOS15 = 3/2 polar_dots/src/multi_mode.asm:11

Referenced in:

Equ: HEIGHT_AT_XPOS14 = 4/2 polar_dots/src/multi_mode.asm:12

Referenced in:

Equ: HEIGHT_AT_XPOS13 = 5/2+1 polar_dots/src/multi_mode.asm:13

Referenced in:
  • polar_dots/src/multi_mode.asm:165
    repeat HEIGHT_AT_XPOS13
    	exx
    		out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    	exx
    		...

Equ: HEIGHT_AT_XPOS12 = 6/2-1 polar_dots/src/multi_mode.asm:14

Referenced in:
  • polar_dots/src/multi_mode.asm:200
    repeat HEIGHT_AT_XPOS12
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx...

Equ: HEIGHT_AT_XPOS11 = 7/2 polar_dots/src/multi_mode.asm:15

Referenced in:
  • polar_dots/src/multi_mode.asm:236
    repeat HEIGHT_AT_XPOS11
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx...

Equ: HEIGHT_AT_XPOS10 = 4+2+1 polar_dots/src/multi_mode.asm:16

Referenced in:
  • polar_dots/src/multi_mode.asm:273
    repeat HEIGHT_AT_XPOS10
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx...

Equ: HEIGHT_AT_XPOS9 = 5+5-1 polar_dots/src/multi_mode.asm:17

Referenced in:
  • polar_dots/src/multi_mode.asm:310
    repeat HEIGHT_AT_XPOS9
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx
    ...

Equ: HEIGHT_AT_XPOS8 = 6+7-5+1-2 polar_dots/src/multi_mode.asm:18

Referenced in:
  • polar_dots/src/multi_mode.asm:347
    repeat HEIGHT_AT_XPOS8
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx
    ...

Equ: HEIGHT_AT_XPOS7 = 1 polar_dots/src/multi_mode.asm:19

Referenced in:
  • polar_dots/src/multi_mode.asm:401
    repeat HEIGHT_AT_XPOS7
    		exx
    			out (c),l  ; MODE droite a envoyer avant la sortie de la HBL 
    		exx
    ...

Equ: .palette_address = $-2 polar_dots/src/polar_loader.asm:75

Referenced in:
  • IntroHBL/src/intro_loader.asm:71
    ld hl, (.palette_address)
  • IntroHBL/src/intro_loader.asm:74
    ld (.palette_address), hl
  • polar_dots/src/polar_loader.asm:71
    ld hl, (.palette_address)
  • polar_dots/src/polar_loader.asm:74
    ld (.palette_address), hl
  • MakeItEasy/src/loading_screen.asm:62
    ld hl, (.palette_address)
  • MakeItEasy/src/loading_screen.asm:65
    ld (.palette_address), hl

Equ: .wait = $-1 polar_dots/src/polar_loader.asm:80

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: PLY_AKM_USE_HOOKS = 0 polar_dots/src/PlayerAkm_basm.asm:133

Equ: PLY_AKM_Data_OffsetWaitEmptyCell = PLY_AKM_Track1_WaitEmptyCell - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2090

Referenced in:

Equ: PLY_AKM_Data_OffsetPtStartTrack = PLY_AKM_Track1_PtStartTrack - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2094

Equ: PLY_AKM_Data_OffsetPtTrack = PLY_AKM_Track1_PtTrack - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2095

Referenced in:

Equ: PLY_AKM_Data_OffsetBaseNote = PLY_AKM_Track1_BaseNote - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2096

Equ: PLY_AKM_Data_OffsetEscapeNote = PLY_AKM_Track1_EscapeNote - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2097

Referenced in:

Equ: PLY_AKM_Data_OffsetEscapeInstrument = PLY_AKM_Track1_EscapeInstrument - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2098

Referenced in:

Equ: PLY_AKM_Data_OffsetEscapeWait = PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2099

Referenced in:

Equ: PLY_AKM_Data_OffsetSecondaryInstrument = PLY_AKM_Track1_EscapeWait - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2100

Equ: PLY_AKM_Data_OffsetPtInstrument = PLY_AKM_Track1_PtInstrument - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2101

Referenced in:

Equ: PLY_AKM_Data_OffsetInstrumentCurrentStep = PLY_AKM_Track1_InstrumentCurrentStep - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2102

Equ: PLY_AKM_Data_OffsetInstrumentSpeed = PLY_AKM_Track1_InstrumentSpeed - PLY_AKM_Track1_Data polar_dots/src/PlayerAkm_basm.asm:2103

Equ: PLY_AKM_Track2_WaitEmptyCell = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetWaitEmptyCell polar_dots/src/PlayerAkm_basm.asm:2147

Referenced in:

Equ: PLY_AKM_Track2_PtTrack = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtTrack polar_dots/src/PlayerAkm_basm.asm:2148

Equ: PLY_AKM_Track2_PtInstrument = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetPtInstrument polar_dots/src/PlayerAkm_basm.asm:2149

Referenced in:

Equ: PLY_AKM_Track2_EscapeNote = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeNote polar_dots/src/PlayerAkm_basm.asm:2150

Referenced in:

Equ: PLY_AKM_Track2_EscapeInstrument = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeInstrument polar_dots/src/PlayerAkm_basm.asm:2151

Referenced in:

Equ: PLY_AKM_Track2_EscapeWait = PLY_AKM_Track2_Data + PLY_AKM_Data_OffsetEscapeWait polar_dots/src/PlayerAkm_basm.asm:2152

Referenced in:

Equ: PLY_AKM_Track3_WaitEmptyCell = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetWaitEmptyCell polar_dots/src/PlayerAkm_basm.asm:2179

Referenced in:

Equ: PLY_AKM_Track3_PtTrack = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtTrack polar_dots/src/PlayerAkm_basm.asm:2180

Equ: PLY_AKM_Track3_PtInstrument = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetPtInstrument polar_dots/src/PlayerAkm_basm.asm:2181

Referenced in:

Equ: PLY_AKM_Track3_EscapeNote = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeNote polar_dots/src/PlayerAkm_basm.asm:2182

Referenced in:

Equ: PLY_AKM_Track3_EscapeInstrument = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeInstrument polar_dots/src/PlayerAkm_basm.asm:2183

Referenced in:

Equ: PLY_AKM_Track3_EscapeWait = PLY_AKM_Track3_Data + PLY_AKM_Data_OffsetEscapeWait polar_dots/src/PlayerAkm_basm.asm:2184

Referenced in:

Equ: PLY_AKM_Registers_OffsetVolume = PLY_AKM_Track1_Volume - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkm_basm.asm:2296

Equ: PLY_AKM_Registers_OffsetSoftwarePeriodLSB = PLY_AKM_Track1_SoftwarePeriodLSB - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkm_basm.asm:2297

Equ: PLY_AKM_Registers_OffsetSoftwarePeriodMSB = PLY_AKM_Track1_SoftwarePeriodMSB - PLY_AKM_Track1_Registers polar_dots/src/PlayerAkm_basm.asm:2298

Equ: SELECTED_CRUNCHER = CRUNCHER_ZX0_BACKWARD MakeItEasy/src/dsk_multimoderupture8_part2.asm:9

Referenced in:

Equ: SET_PAL_0P = 0 MakeItEasy/src/palettes.asm:3

Referenced in:
  • MakeItEasy/src/scenario_table.asm:163
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:176
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:186
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1748
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1757
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1767
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1774
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1781
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1787
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1797
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1804
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1811
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1820
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:1996
    defb SET_PAL_0P
  • MakeItEasy/src/scenario_table.asm:2005
    defb SET_PAL_0P

Equ: SET_PAL_1P = 11 MakeItEasy/src/palettes.asm:4

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:51
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:61
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:248
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:257
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:266
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:273
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:280
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_effets.asm:289
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_table.asm:684
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_table.asm:693
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_table.asm:702
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_table.asm:709
    defb SET_PAL_1P
  • MakeItEasy/src/scenario_table.asm:716
    defb SET_PAL_1P

Equ: SET_PAL_2P = 22 MakeItEasy/src/palettes.asm:5

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:70
    defb SET_PAL_2P
  • MakeItEasy/src/scenario_effets.asm:77
    defb SET_PAL_2P

Equ: SET_PAL_3P = 33 MakeItEasy/src/palettes.asm:6

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:84
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_effets.asm:94
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:154
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:723
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:732
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:739
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:746
    defb SET_PAL_3P
  • MakeItEasy/src/scenario_table.asm:753
    defb SET_PAL_3P

Equ: SET_PAL_4P = 44 MakeItEasy/src/palettes.asm:7

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:101
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_effets.asm:108
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_effets.asm:296
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_effets.asm:303
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1082
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1092
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1101
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1108
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1115
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1122
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1132
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1139
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1146
    defb SET_PAL_4P
  • MakeItEasy/src/scenario_table.asm:1153
    defb SET_PAL_4P

Equ: SET_PAL_5P = 55 MakeItEasy/src/palettes.asm:8

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1500
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1507
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1516
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1523
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1531
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1538
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1548
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1555
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1562
    defb SET_PAL_5P
  • MakeItEasy/src/scenario_table.asm:1571
    defb SET_PAL_5P

Equ: SET_PAL_6P = 66 MakeItEasy/src/palettes.asm:9

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1250
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1260
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1269
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1276
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1284
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1290
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1300
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1307
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1314
    defb SET_PAL_6P
  • MakeItEasy/src/scenario_table.asm:1322
    defb SET_PAL_6P

Equ: SET_PAL_7P = 77 MakeItEasy/src/palettes.asm:10

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:118
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:127
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:136
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:143
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:150
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:159
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:166
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:173
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:183
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:192
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:201
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:208
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:215
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:224
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:231
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_effets.asm:238
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1582
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1589
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1598
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1605
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1613
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1620
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1630
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1637
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1644
    defb SET_PAL_7P
  • MakeItEasy/src/scenario_table.asm:1653
    defb SET_PAL_7P

Equ: SET_PAL_8P = 88 MakeItEasy/src/palettes.asm:11

Referenced in:
  • MakeItEasy/src/scenario_table.asm:660
    defb SET_PAL_8P
  • MakeItEasy/src/scenario_table.asm:667
    defb SET_PAL_8P
  • MakeItEasy/src/scenario_table.asm:675
    defb SET_PAL_8P

Equ: SET_PAL_9P = 99 MakeItEasy/src/palettes.asm:12

Referenced in:
  • MakeItEasy/src/scenario_table.asm:354
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:364
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:373
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:380
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:389
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:629
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:637
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:644
    defb SET_PAL_9P
  • MakeItEasy/src/scenario_table.asm:653
    defb SET_PAL_9P

Equ: SET_PAL_10P = 110 MakeItEasy/src/palettes.asm:13

Referenced in:
  • MakeItEasy/src/scenario_table.asm:398
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:408
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:415
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:422
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:430
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:603
    defb SET_PAL_10P 
  • MakeItEasy/src/scenario_table.asm:613
    defb SET_PAL_10P
  • MakeItEasy/src/scenario_table.asm:622
    defb SET_PAL_10P

Equ: SET_PAL_11P = 121 MakeItEasy/src/palettes.asm:14

Referenced in:
  • MakeItEasy/src/scenario_table.asm:999
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1008
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1017
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1024
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1032
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1038
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1047
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1054
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1061
    defb SET_PAL_11P
  • MakeItEasy/src/scenario_table.asm:1069
    defb SET_PAL_11P

Equ: SET_PAL_12P = 132 MakeItEasy/src/palettes.asm:15

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1165
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1175
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1184
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1191
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1199
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1205
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1215
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1222
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1229
    defb SET_PAL_12P
  • MakeItEasy/src/scenario_table.asm:1238
    defb SET_PAL_12P

Equ: SET_PAL_13P = 143 MakeItEasy/src/palettes.asm:16

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1333
    defb SET_PAL_13P 
  • MakeItEasy/src/scenario_table.asm:1343
    defb SET_PAL_13P
  • MakeItEasy/src/scenario_table.asm:1352
    defb SET_PAL_13P
  • MakeItEasy/src/scenario_table.asm:1390
    defb SET_PAL_13P
  • MakeItEasy/src/scenario_table.asm:1397
    defb SET_PAL_13P
  • MakeItEasy/src/scenario_table.asm:1406
    defb SET_PAL_13P

Equ: SET_PAL_14P = 154 MakeItEasy/src/palettes.asm:17

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1359
    defb SET_PAL_14P
  • MakeItEasy/src/scenario_table.asm:1366
    defb SET_PAL_14P
  • MakeItEasy/src/scenario_table.asm:1373
    defb SET_PAL_14P
  • MakeItEasy/src/scenario_table.asm:1383
    defb SET_PAL_14P

Equ: SET_PAL_15P = 165 MakeItEasy/src/palettes.asm:18

Referenced in:
  • MakeItEasy/src/scenario_table.asm:525
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:534
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:543
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:550
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:557
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:564
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:573
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:580
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:587
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:594
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:922
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:931
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:940
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:947
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:954
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:960
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:969
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:976
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:983
    defb SET_PAL_15P
  • MakeItEasy/src/scenario_table.asm:990
    defb SET_PAL_15P

Equ: SET_PAL_16P = 176 MakeItEasy/src/palettes.asm:19

Referenced in:
  • MakeItEasy/src/scenario_table.asm:443
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:453
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:462
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:469
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:477
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:484
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:494
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:501
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:508
    defb SET_PAL_16P
  • MakeItEasy/src/scenario_table.asm:515
    defb SET_PAL_16P

Equ: SET_PAL_17P = 187 MakeItEasy/src/palettes.asm:20

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1418
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1425
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1434
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1441
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1449
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1480
    defb SET_PAL_17P
  • MakeItEasy/src/scenario_table.asm:1489
    defb SET_PAL_17P 

Equ: SET_PAL_18P = 198 MakeItEasy/src/palettes.asm:21

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1456
    defb SET_PAL_18P
  • MakeItEasy/src/scenario_table.asm:1466
    defb SET_PAL_18P
  • MakeItEasy/src/scenario_table.asm:1473
    defb SET_PAL_18P

Equ: SET_PAL_19P = 209 MakeItEasy/src/palettes.asm:22

Equ: SET_PAL_20P = 220 MakeItEasy/src/palettes.asm:23

Referenced in:
  • MakeItEasy/src/scenario_table.asm:764
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:774
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:783
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:790
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:797
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:803
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:813
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:820
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:827
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:835
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:843
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:852
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:861
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:868
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:875
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:882
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:891
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:898
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:905
    defb SET_PAL_20P
  • MakeItEasy/src/scenario_table.asm:912
    defb SET_PAL_20P

Equ: SET_PAL_21P = 231 MakeItEasy/src/palettes.asm:24

Referenced in:
  • MakeItEasy/src/scenario_table.asm:195
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:202
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:209
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:215
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:226
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:233
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:240
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:249
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:259
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:270
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:281
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:290
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:300
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:310
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:322
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:329
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:336
    defb SET_PAL_21P
  • MakeItEasy/src/scenario_table.asm:344
    defb SET_PAL_21P

Equ: SET_PAL_22P = 242 MakeItEasy/src/palettes.asm:25

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1666
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1673
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1682
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1689
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1697
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1704
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1714
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1721
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1728
    defb SET_PAL_22P
  • MakeItEasy/src/scenario_table.asm:1737
    defb SET_PAL_22P

Equ: Reg2 = &30+2 MakeItEasy/src/multimoderupture8.asm:6

Referenced in:
  • polar_dots/src/multi_mode.asm:42
    ld a,Reg2
  • polar_dots/src/multi_mode.asm:356
    ld l,Reg2
  • MakeItEasy/src/multimoderupture8.asm:70
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8.asm:339
    ld hl,8*256+Reg2
  • MakeItEasy/src/exit.asm:11
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:115
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:383
    ld l,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2

Equ: TABLE_PRECAL_OFFSET = FILE_OFFSET+3 MakeItEasy/src/multimoderupture8.asm:10

Equ: RestoreSp = $+1 MakeItEasy/src/multimoderupture8.asm:124

Referenced in:
  • IntroHBL/src/intro_code.asm:952
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8.asm:108
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8_BAK.asm:217
    ld	(RestoreSp), sp

Equ: C1 = 86 MakeItEasy/src/multimoderupture8.asm:450

Referenced in:
  • linking/src/demosystem/public.asm:106
        assert $<0xC000, "You cannot be here as we will switch in &C1 and &C2 configurations" ; TODO use...

Equ: C2 = 92 MakeItEasy/src/multimoderupture8.asm:451

Referenced in:
  • linking/src/demosystem/public.asm:106
        assert $<0xC000, "You cannot be here as we will switch in &C1 and &C2 configurations" ; TODO use...

Equ: C3 = 92 MakeItEasy/src/multimoderupture8.asm:452

Equ: C4 = 92 MakeItEasy/src/multimoderupture8.asm:453

Referenced in:
  • linking/src/demosystem/common.asm:285
    		; Here, C4=({from})

Equ: INTERLACED = 0 MakeItEasy/src/routine_logozone.asm:1

Equ: STEP_CURVE = 1 MakeItEasy/src/routine_logozone.asm:400

Equ: NB_SCROLL1 = 18 MakeItEasy/src/routine_logozone.asm:401

Referenced in:

Equ: NB_SCROLL2 = 9 MakeItEasy/src/routine_logozone.asm:469

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:300
    repeat NB_SCROLL2,i,1
    
    MOVE_HBL2_{{i}} 
    		if STATIC = 0
              ld a,c
    		 add l
    		 ld l,a
    		else
    	...

Equ: NB_SCROLL3 = 6 MakeItEasy/src/routine_logozone.asm:521

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:309
    repeat NB_SCROLL3,i,1
    
    MOVE_HBL3_{{i}} if STATIC = 0
              ld a,c
    		 add l
    		 ld l,a
    		else
    	 	d...

Equ: STEP_CURVE_I = 1 MakeItEasy/src/routine_logozone.asm:571

Equ: NB_SCROLL1_I = 17 MakeItEasy/src/routine_logozone.asm:575

Referenced in:

Equ: NB_SCROLL2_I = 9 MakeItEasy/src/routine_logozone.asm:632

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:350
    repeat NB_SCROLL2_I,j,1
    MOVE_HBLJ{{j}} 
    	if STATIC = 0
             ld a,c
    		 add l
    		 ld l,a
    		else
    	 	...

Equ: NB_SCROLL3_I = 7 MakeItEasy/src/routine_logozone.asm:684

Referenced in:
  • MakeItEasy/src/routine_logozone.asm:361
    repeat NB_SCROLL3_I,i,1
    MOVE_HBLK{{i}} if STATIC = 0
             ld a,c
    		 add l
    		 ld l,a
    		else
    	 	de...

Equ: MODE2_MODE2 = &8e8e MakeItEasy/src/scenario_effets.asm:1

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:493
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:533
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:543
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:559
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:572
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:844
    ld hl,MODE2_MODE2

Equ: MODE2_MODE1 = &8e8d MakeItEasy/src/scenario_effets.asm:2

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:1193
    ld hl,MODE2_MODE1
  • MakeItEasy/src/effets_scenario.asm:1217
    ld hl,MODE2_MODE1

Equ: MODE2_MODE0 = &8e8c MakeItEasy/src/scenario_effets.asm:3

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:58
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:305
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:317
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:342
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:450
    ld hl,MODE2_MODE0 
  • MakeItEasy/src/effets_scenario.asm:476
    ld hl,MODE2_MODE0 
  • MakeItEasy/src/effets_scenario.asm:904
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:987
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1058
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1095
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1122
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1241
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1293
    ld hl,MODE2_MODE0

Equ: MODE1_MODE2 = &8d8e MakeItEasy/src/scenario_effets.asm:5

Equ: MODE1_MODE1 = &8d8d MakeItEasy/src/scenario_effets.asm:6

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:507
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:587
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:598
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:617
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:619
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:788
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:796
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:879
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:887
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:962
    ld hl,MODE1_MODE1

Equ: MODE1_MODE0 = &8d8c MakeItEasy/src/scenario_effets.asm:7

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:257
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:422
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:756
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:764
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:852
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:979
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1002
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1010
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1026
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1034
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1438
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1457
    ld hl,MODE1_MODE0

Equ: MODE0_MODE2 = &8c8e MakeItEasy/src/scenario_effets.asm:9

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:117
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:206
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:228
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:293
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:329
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:448
    ld hl,MODE0_MODE2 
  • MakeItEasy/src/effets_scenario.asm:474
    ld hl,MODE0_MODE2 
  • MakeItEasy/src/effets_scenario.asm:725
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:733
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:818
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:826
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:912
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:929
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:937
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:954
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1169
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1318
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1382
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1401
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1420
    ld hl,MODE0_MODE2

Equ: MODE0_MODE1 = &8c8d MakeItEasy/src/scenario_effets.asm:10

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:81
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:133
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:156
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:179
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:191
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:245
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:358
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:700
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:1149
    ld hl,MODE0_MODE1

Equ: MODE0_MODE0 = &8c8c MakeItEasy/src/scenario_effets.asm:11

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:269
    ld hl,MODE0_MODE0
  • MakeItEasy/src/effets_scenario.asm:281
    ld hl,MODE0_MODE0

Equ: GFX_M0_CREDITS_INTRO = BITMAPS+160 MakeItEasy/src/scenario_effets.asm:13

Referenced in:

Equ: GFX_M0_CREDITS_POLAR = BITMAPS+480+480 MakeItEasy/src/scenario_effets.asm:14

Referenced in:

Equ: GFX_M0_8BITLOVE = BITMAPS+320 MakeItEasy/src/scenario_effets.asm:15

Referenced in:

Equ: GFX_M2_CREDITS = BITMAPS+480 MakeItEasy/src/scenario_effets.asm:16

Referenced in:

Equ: GFX_M1_LOGO_BND = BITMAPS+480+160 MakeItEasy/src/scenario_effets.asm:17

Referenced in:

Equ: GFX_M2_CREDITS_INVERTED = BITMAPS+480+320 MakeItEasy/src/scenario_effets.asm:18

Referenced in:

Equ: SOURCE_GFX1_L = GFX_M0_CREDITS_INTRO+4 MakeItEasy/src/scenario_effets.asm:22

Referenced in:

Equ: SOURCE_GFX1_R = GFX_M2_CREDITS_INVERTED+1 MakeItEasy/src/scenario_effets.asm:23

Referenced in:

Equ: SOURCE_GFX2_L = GFX_M0_8BITLOVE+6+8 MakeItEasy/src/scenario_effets.asm:25

Referenced in:

Equ: SOURCE_GFX2_R = GFX_M2_CREDITS+2 MakeItEasy/src/scenario_effets.asm:26

Referenced in:

Equ: SOURCE_GFX3_L = GFX_M1_LOGO_BND+13 MakeItEasy/src/scenario_effets.asm:28

Referenced in:

Equ: SOURCE_GFX3_R = GFX_M1_LOGO_BND+3 MakeItEasy/src/scenario_effets.asm:29

Referenced in:

Equ: SOURCE_GFX4_R = GFX_M0_8BITLOVE MakeItEasy/src/scenario_effets.asm:31

Equ: SOURCE_GFX5_L = GFX_M0_CREDITS_POLAR MakeItEasy/src/scenario_effets.asm:33

Referenced in:

Equ: SOURCE_GFX5_R = GFX_M2_CREDITS_INVERTED+1 MakeItEasy/src/scenario_effets.asm:34

Referenced in:

Equ: DESTINATION1 = &8000 MakeItEasy/src/scenario_effets.asm:36

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:56
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:66
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_effets.asm:74
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:81
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_effets.asm:90
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_effets.asm:98
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_effets.asm:105
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_effets.asm:112
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_effets.asm:253
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:262
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_effets.asm:270
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:277
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_effets.asm:285
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_effets.asm:293
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_effets.asm:300
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_effets.asm:307
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_effets.asm:319
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:327
    defw DESTINATION1+&44
  • MakeItEasy/src/scenario_effets.asm:334
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:341
    defw DESTINATION1+&98+&44
  • MakeItEasy/src/scenario_effets.asm:349
    defw DESTINATION1+&131 
  • MakeItEasy/src/scenario_effets.asm:357
    defw DESTINATION1+&44+&131
  • MakeItEasy/src/scenario_effets.asm:364
    defw DESTINATION1+&98+&131
  • MakeItEasy/src/scenario_effets.asm:371
    defw DESTINATION1+&98+&44+&131
  • MakeItEasy/src/scenario_effets.asm:440
    defw DESTINATION1
  • MakeItEasy/src/scenario_effets.asm:441
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:159
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:168
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:181
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:191
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:199
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:206
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:212
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:222
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:230
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:237
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:244
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:252
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:448
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:458
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:466
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:473
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:481
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:490
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:498
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:505
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:512
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:519
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:608
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:618
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:626
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:633
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:641
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:649
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:657
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:664
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:671
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:679
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:769
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:779
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:787
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:794
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:801
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:809
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:817
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:824
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:831
    defw DESTINATION1+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:839
    defw DESTINATION1+&98+&43+&130   
  • MakeItEasy/src/scenario_table.asm:927
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:936
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:944
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:951
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:957
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:965
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:973
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:980
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:987
    defw DESTINATION1+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:994
    defw DESTINATION1+&98+&43+&130   
  • MakeItEasy/src/scenario_table.asm:1087
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1097
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1105
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1112
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1119
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1128
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1136
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1143
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1150
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1157
    defw DESTINATION1+&98+&43+&130            
  • MakeItEasy/src/scenario_table.asm:1255
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1265
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1273
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1280
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1288
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1296
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1304
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1311
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1318
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1326
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1422
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:1430
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1438
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1445
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1453
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1462
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1470
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1477
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1484
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1493
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1586
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:1594
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1602
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1609
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1617
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1626
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1634
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1641
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1648
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1657
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1752
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1762
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1771
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1778
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1784
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1793
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1801
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1808
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1815
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1823
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:2001
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:2010
    defw DESTINATION1 

Equ: DESTINATION2 = &8400 MakeItEasy/src/scenario_effets.asm:37

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:383
    defw DESTINATION2 
  • MakeItEasy/src/scenario_effets.asm:391
    defw DESTINATION2+&44          
  • MakeItEasy/src/scenario_effets.asm:397
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_effets.asm:404
    defw DESTINATION2+&98+&44 
  • MakeItEasy/src/scenario_effets.asm:412
    defw DESTINATION2+&131 
  • MakeItEasy/src/scenario_effets.asm:420
    defw DESTINATION2+&44+&131
  • MakeItEasy/src/scenario_effets.asm:427
    defw DESTINATION2+&98+&131
  • MakeItEasy/src/scenario_effets.asm:434
    defw DESTINATION2+&98+&44+&131
  • MakeItEasy/src/scenario_table.asm:263
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:275
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:285
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:294
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:304
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:316
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:326
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:333
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:340
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:348
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:689
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:698
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:706
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:713
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:720
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:728
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:736
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:743
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:750
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:756
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:848
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:857
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:865
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:872
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:879
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:887
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:895
    defw DESTINATION2+&43+&130 
  • MakeItEasy/src/scenario_table.asm:902
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:909
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:916
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1170
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1180
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1188
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1195
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1203
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1211
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1219
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1226
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1233
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1242
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1338
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1348
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1356
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1363
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1370
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1379
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1387
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1394
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1401
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1410
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1504
    defw DESTINATION2
  • MakeItEasy/src/scenario_table.asm:1512
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1520
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1527
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1535
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1544
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1552
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1559
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1566
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1575
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1917
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1927
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1935
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1942
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1950
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1960
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1968
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1975
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1982
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1990
    defw DESTINATION2+&98+&43+&130 

Equ: DESTINATION3 = &C000 MakeItEasy/src/scenario_effets.asm:38

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:188
    defw DESTINATION3 
  • MakeItEasy/src/scenario_effets.asm:197
    defw DESTINATION3+&43+1 
  • MakeItEasy/src/scenario_effets.asm:205
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_effets.asm:212
    defw DESTINATION3+&98+&43+1
  • MakeItEasy/src/scenario_effets.asm:220
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_effets.asm:228
    defw DESTINATION3+&43+&130+1
  • MakeItEasy/src/scenario_effets.asm:235
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_effets.asm:242
    defw DESTINATION3+&98+&43+&130+1
  • MakeItEasy/src/scenario_table.asm:1004
    defw DESTINATION3 
  • MakeItEasy/src/scenario_table.asm:1013
    defw DESTINATION3+&43 
  • MakeItEasy/src/scenario_table.asm:1021
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_table.asm:1028
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1036
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1043
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_table.asm:1051
    defw DESTINATION3+&43+&130
  • MakeItEasy/src/scenario_table.asm:1058
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_table.asm:1065
    defw DESTINATION3+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:1073
    defw DESTINATION3+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:1670
    defw DESTINATION3
  • MakeItEasy/src/scenario_table.asm:1686
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_table.asm:1710
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_table.asm:1725
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_table.asm:1844
    defw DESTINATION3+&43 
  • MakeItEasy/src/scenario_table.asm:1859
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1867
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1885
    defw DESTINATION3+&43+&130
  • MakeItEasy/src/scenario_table.asm:1899
    defw DESTINATION3+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1907
    defw DESTINATION3+&98+&43+&130

Equ: DESTINATION4 = &c400 MakeItEasy/src/scenario_effets.asm:39

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:123
    defw DESTINATION4 
  • MakeItEasy/src/scenario_effets.asm:132
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_effets.asm:140
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_effets.asm:147
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_effets.asm:155
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_effets.asm:163
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_effets.asm:170
    defw DESTINATION4+&98+&130
  • MakeItEasy/src/scenario_effets.asm:177
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:359
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:369
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:377
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:385
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:393
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:404
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:412
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:419
    defw DESTINATION4+&98+&130
  • MakeItEasy/src/scenario_table.asm:426
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:434
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:530
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:539
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:547
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:554
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:561
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:569
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:577
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:584
    defw DESTINATION4+&98+&130 
  • MakeItEasy/src/scenario_table.asm:591
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:598
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1678
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:1693
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:1701
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:1718
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:1732
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1741
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1834
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:1852
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:1877
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:1892
    defw DESTINATION4+&98+&130

Equ: MODE2_COL1 = 77 MakeItEasy/src/scenario_effets.asm:44

Equ: MODE2_COL2 = 76 MakeItEasy/src/scenario_effets.asm:45

Equ: MODE2_COL3 = 95 MakeItEasy/src/scenario_effets.asm:46

Equ: MODE2_COL4 = 85 MakeItEasy/src/scenario_effets.asm:47

Equ: TRANS_L_LENGTH = 64 MakeItEasy/src/scenario_effets.asm:49

Referenced in:

Equ: TRANS_R_LENGTH = 80 MakeItEasy/src/scenario_effets.asm:50

Referenced in:

Equ: SELECTED_CRUNCHER = CRUNCHER_ZX0_BACKWARD MakeItEasy/src/dsk_multimoderupture8_part1.asm:19

Referenced in:

Equ: START_DS = &6000 MakeItEasy/src/dsk_multimoderupture8_part1.asm:81

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:88
    ld hl,START_DS
  • MakeItEasy/src/exit.asm:278
    ld de,START_DS

Equ: length = $-start MakeItEasy/src/dsk_multimoderupture8_part1.asm:201

Referenced in:
  • linking/src/demosystem/linker_common.asm:100
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:100
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:144
    		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length
  • linking/src/demosystem/linker_common.asm:144
    		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:201
    				assert {to} >= {moved_from} + {from}.length + {from}.delta
  • linking/src/demosystem/linker_common.asm:201
    				assert {to} >= {moved_from} + {from}.length + {from}.delta
  • linking/src/demosystem/linker_common.asm:219
    			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into accoun...
  • linking/src/demosystem/linker_common.asm:219
    			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into accoun...
  • linking/src/demosystem/linker_common.asm:253
    		ld hl, {moved_from} +  {from}.length - 1
  • linking/src/demosystem/linker_common.asm:253
    		ld hl, {moved_from} +  {from}.length - 1
  • linking/src/demosystem/linker_common.asm:300
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:300
    		ld bc, {from}.length

Equ: length_800 = $ - start_800 MakeItEasy/src/sna_multimoderupture8.asm:13

Equ: length_4000 = $- start_4000 MakeItEasy/src/sna_multimoderupture8.asm:185

Referenced in:
  • MakeItEasy/src/sna_multimoderupture8.asm:109
    assert length_4000 <= 0x4000

Equ: length_c6 = $-start_c6 MakeItEasy/src/sna_multimoderupture8.asm:206

Equ: length_c4 = 0x4000 MakeItEasy/src/sna_multimoderupture8.asm:220

Equ: length_c5 = 0x4000 MakeItEasy/src/sna_multimoderupture8.asm:231

Equ: length_c7 = 0x4000 MakeItEasy/src/sna_multimoderupture8.asm:243

Equ: DISABLE_EXIT = false MakeItEasy/src/exit.asm:3

Equ: START_DS = &6000 MakeItEasy/src/exit.asm:352

Referenced in:
  • MakeItEasy/src/dsk_multimoderupture8_part1.asm:88
    ld hl,START_DS
  • MakeItEasy/src/exit.asm:278
    ld de,START_DS

Equ: INK0 = 92 MakeItEasy/src/multimoderupture8_BAK.asm:8

Referenced in:
  • IntroHBL/src/intro_code.asm:2718
    defb INK0,BORDER_BOTTOM
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: INK1 = 77 MakeItEasy/src/multimoderupture8_BAK.asm:9

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: B1 = 93 MakeItEasy/src/multimoderupture8_BAK.asm:10

Referenced in:
  • MakeItEasy/src/multimoderupture8_BAK.asm:533
    defb B1,B1,B1,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:534
    defb B1,B1,B2,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:535
    defb B1,B2,B1,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:536
    defb B2,B1,B1,B1

Equ: B2 = 87 MakeItEasy/src/multimoderupture8_BAK.asm:11

Referenced in:
  • MakeItEasy/src/palettes.asm:138
    defb 84,84,84,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2     
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:533
    defb B1,B1,B1,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:534
    defb B1,B1,B2,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:535
    defb B1,B2,B1,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:536
    defb B2,B1,B1,B1

Equ: R5 = 0 MakeItEasy/src/multimoderupture8_BAK.asm:13

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:192
    ld a,8-R5
  • MakeItEasy/src/exit.asm:37
    ld a,0+R5
  • MakeItEasy/src/multimoderupture8_BAK.asm:252
    ld a,8-R5

Equ: NBMOVESMAX = 27*4 MakeItEasy/src/multimoderupture8_BAK.asm:23

Equ: BuffSize = #B42 MakeItEasy/src/multimoderupture8_BAK.asm:28

Referenced in:

Equ: PlayerSize = 611 MakeItEasy/src/multimoderupture8_BAK.asm:29

Referenced in:

Equ: FapInit = #7000 MakeItEasy/src/multimoderupture8_BAK.asm:31

Referenced in:
  • IntroHBL/src/intro_code.asm:110
    call    FapInit
  • MakeItEasy/src/multimoderupture8.asm:46
    call    FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:45
    org	FapInit
  • MakeItEasy/src/multimoderupture8_BAK.asm:86
    call    FapInit

Equ: FapBuff = #4000 MakeItEasy/src/multimoderupture8_BAK.asm:32

Referenced in:

Equ: HiFapBuff = #40 MakeItEasy/src/multimoderupture8_BAK.asm:33

Referenced in:
  • IntroHBL/src/intro_code.asm:102
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8.asm:38
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8_BAK.asm:78
    ld	a,HiFapBuff 	

Equ: FapPlay = FapBuff+BuffSize MakeItEasy/src/multimoderupture8_BAK.asm:34

Referenced in:

Equ: FapData = FapPlay+PlayerSize MakeItEasy/src/multimoderupture8_BAK.asm:35

Referenced in:
  • IntroHBL/src/intro_code.asm:108
    ld	hl, FapData     
  • IntroHBL/src/music.asm:9
    PlayerSize equ FapData - FapPlay
  • MakeItEasy/src/multimoderupture8.asm:44
    ld	hl, FapData     
  • MakeItEasy/src/multimoderupture8_BAK.asm:49
    org	FapData
  • MakeItEasy/src/multimoderupture8_BAK.asm:84
    ld	hl, FapData     
  • MakeItEasy/src/music.asm:15
    org	FapData

Equ: Reg2 = &30+2 MakeItEasy/src/multimoderupture8_BAK.asm:52

Referenced in:
  • polar_dots/src/multi_mode.asm:42
    ld a,Reg2
  • polar_dots/src/multi_mode.asm:356
    ld l,Reg2
  • MakeItEasy/src/multimoderupture8.asm:70
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8.asm:339
    ld hl,8*256+Reg2
  • MakeItEasy/src/exit.asm:11
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:115
    ld a,Reg2
  • MakeItEasy/src/multimoderupture8_BAK.asm:383
    ld l,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2
  • polar_dots/src/polar.asm:70
    	ld a,Reg2

Equ: RestoreSp = $+1 MakeItEasy/src/multimoderupture8_BAK.asm:222

Referenced in:
  • IntroHBL/src/intro_code.asm:952
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8.asm:108
    ld	(RestoreSp), sp
  • MakeItEasy/src/multimoderupture8_BAK.asm:217
    ld	(RestoreSp), sp

Equ: BuffSize = #B42 MakeItEasy/src/music.asm:1

Referenced in:

Equ: PlayerSize = 611 MakeItEasy/src/music.asm:2

Referenced in:

Equ: FapBuff = #4000 MakeItEasy/src/music.asm:5

Referenced in:

Equ: HiFapBuff = #40 MakeItEasy/src/music.asm:6

Referenced in:
  • IntroHBL/src/intro_code.asm:102
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8.asm:38
    ld	a,HiFapBuff 	
  • MakeItEasy/src/multimoderupture8_BAK.asm:78
    ld	a,HiFapBuff 	

Equ: FapPlay = FapBuff+BuffSize MakeItEasy/src/music.asm:7

Referenced in:

Equ: FapData = FapPlay+PlayerSize MakeItEasy/src/music.asm:8

Referenced in:
  • IntroHBL/src/intro_code.asm:108
    ld	hl, FapData     
  • IntroHBL/src/music.asm:9
    PlayerSize equ FapData - FapPlay
  • MakeItEasy/src/multimoderupture8.asm:44
    ld	hl, FapData     
  • MakeItEasy/src/multimoderupture8_BAK.asm:49
    org	FapData
  • MakeItEasy/src/multimoderupture8_BAK.asm:84
    ld	hl, FapData     
  • MakeItEasy/src/music.asm:15
    org	FapData

Equ: MODE2_MODE2 = &8e8e MakeItEasy/src/scenario_table.asm:1

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:493
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:533
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:543
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:559
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:572
    ld hl,MODE2_MODE2
  • MakeItEasy/src/effets_scenario.asm:844
    ld hl,MODE2_MODE2

Equ: MODE2_MODE1 = &8e8d MakeItEasy/src/scenario_table.asm:2

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:1193
    ld hl,MODE2_MODE1
  • MakeItEasy/src/effets_scenario.asm:1217
    ld hl,MODE2_MODE1

Equ: MODE2_MODE0 = &8e8c MakeItEasy/src/scenario_table.asm:3

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:58
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:305
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:317
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:342
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:450
    ld hl,MODE2_MODE0 
  • MakeItEasy/src/effets_scenario.asm:476
    ld hl,MODE2_MODE0 
  • MakeItEasy/src/effets_scenario.asm:904
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:987
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1058
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1095
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1122
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1241
    ld hl,MODE2_MODE0
  • MakeItEasy/src/effets_scenario.asm:1293
    ld hl,MODE2_MODE0

Equ: MODE1_MODE2 = &8d8e MakeItEasy/src/scenario_table.asm:5

Equ: MODE1_MODE1 = &8d8d MakeItEasy/src/scenario_table.asm:6

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:507
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:587
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:598
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:617
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:619
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:788
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:796
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:879
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:887
    ld hl,MODE1_MODE1
  • MakeItEasy/src/effets_scenario.asm:962
    ld hl,MODE1_MODE1

Equ: MODE1_MODE0 = &8d8c MakeItEasy/src/scenario_table.asm:7

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:257
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:422
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:756
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:764
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:852
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:979
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1002
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1010
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1026
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1034
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1438
    ld hl,MODE1_MODE0
  • MakeItEasy/src/effets_scenario.asm:1457
    ld hl,MODE1_MODE0

Equ: MODE0_MODE2 = &8c8e MakeItEasy/src/scenario_table.asm:9

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:117
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:206
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:228
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:293
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:329
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:448
    ld hl,MODE0_MODE2 
  • MakeItEasy/src/effets_scenario.asm:474
    ld hl,MODE0_MODE2 
  • MakeItEasy/src/effets_scenario.asm:725
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:733
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:818
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:826
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:912
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:929
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:937
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:954
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1169
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1318
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1382
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1401
    ld hl,MODE0_MODE2
  • MakeItEasy/src/effets_scenario.asm:1420
    ld hl,MODE0_MODE2

Equ: MODE0_MODE1 = &8c8d MakeItEasy/src/scenario_table.asm:10

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:81
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:133
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:156
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:179
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:191
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:245
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:358
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:700
    ld hl,MODE0_MODE1
  • MakeItEasy/src/effets_scenario.asm:1149
    ld hl,MODE0_MODE1

Equ: MODE0_MODE0 = &8c8c MakeItEasy/src/scenario_table.asm:11

Referenced in:
  • MakeItEasy/src/effets_scenario.asm:269
    ld hl,MODE0_MODE0
  • MakeItEasy/src/effets_scenario.asm:281
    ld hl,MODE0_MODE0

Equ: GFX_BNDCP5 = BITMAPS MakeItEasy/src/scenario_table.asm:13

Referenced in:

Equ: GFX_BNDM0_1 = BITMAPS MakeItEasy/src/scenario_table.asm:14

Referenced in:
  • MakeItEasy/src/scenario_table.asm:446
    defw GFX_BNDM0_1+8
  • MakeItEasy/src/scenario_table.asm:488
    defw GFX_BNDM0_1+8-1
  • MakeItEasy/src/scenario_table.asm:846
    defw GFX_BNDM0_1+8
  • MakeItEasy/src/scenario_table.asm:885
    defw GFX_BNDM0_1+8-1 

Equ: GFX_BNDM0_2 = BITMAPS+80 MakeItEasy/src/scenario_table.asm:15

Referenced in:
  • MakeItEasy/src/scenario_table.asm:465
    defw GFX_BNDM0_2+8
  • MakeItEasy/src/scenario_table.asm:504
    defw GFX_BNDM0_2+8-1
  • MakeItEasy/src/scenario_table.asm:864
    defw GFX_BNDM0_2+8
  • MakeItEasy/src/scenario_table.asm:901
    defw GFX_BNDM0_2+8-1

Equ: GFX_M0_CREDITS_INTRO = BITMAPS MakeItEasy/src/scenario_table.asm:17

Referenced in:

Equ: GFX_M0_HOTBOLD = BITMAPS+160 MakeItEasy/src/scenario_table.asm:18

Referenced in:

Equ: GFX_M0_8BITLOVE = BITMAPS+320 MakeItEasy/src/scenario_table.asm:20

Referenced in:

Equ: GFX_DESIRE1 = BITMAPS+480 MakeItEasy/src/scenario_table.asm:22

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1011
    defw GFX_DESIRE1+1 
  • MakeItEasy/src/scenario_table.asm:1050
    defw GFX_DESIRE1+1-1

Equ: GFX_OLDBITS1 = BITMAPS+480+80 MakeItEasy/src/scenario_table.asm:23

Referenced in:

Equ: GFX_DESIRE2 = BITMAPS+480+160 MakeItEasy/src/scenario_table.asm:24

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1027
    defw GFX_DESIRE2+1
  • MakeItEasy/src/scenario_table.asm:1035
    defw GFX_DESIRE2+1 
  • MakeItEasy/src/scenario_table.asm:1064
    defw GFX_DESIRE2+1-1 
  • MakeItEasy/src/scenario_table.asm:1072
    defw GFX_DESIRE2+1-1

Equ: GFX_OLDBITS2 = BITMAPS+480+240 MakeItEasy/src/scenario_table.asm:25

Referenced in:

Equ: GFX_M1_STILL1 = BITMAPS+480+320 MakeItEasy/src/scenario_table.asm:26

Referenced in:

Equ: GFX_M2_BENEDICTION1 = BITMAPS+480+320+80 MakeItEasy/src/scenario_table.asm:27

Referenced in:

Equ: GFX_M2_CREDITS_INVERTED1 = 0000 MakeItEasy/src/scenario_table.asm:29

Referenced in:

Equ: GFX_M2_CREDITS_INVERTED2 = 000 MakeItEasy/src/scenario_table.asm:30

Referenced in:

Equ: GFX_M1_STILL2 = BITMAPS+480+320+160 MakeItEasy/src/scenario_table.asm:32

Referenced in:

Equ: GFX_M2_BENEDICTION2 = BITMAPS+480+320+160+80 MakeItEasy/src/scenario_table.asm:33

Referenced in:

Equ: GFX_M0_30YEARS = BITMAPS+480+640 MakeItEasy/src/scenario_table.asm:34

Referenced in:

Equ: GFX_CYCLINGL1 = BITMAPS+480+640+160 MakeItEasy/src/scenario_table.asm:37

Equ: GFX_CYCLINGL2 = BITMAPS+480+640+160+80 MakeItEasy/src/scenario_table.asm:38

Equ: GFX_CYCLINGL3 = BITMAPS+480+640+160+160 MakeItEasy/src/scenario_table.asm:39

Equ: GFX_CYCLINGL4 = BITMAPS+480+640+160+240 MakeItEasy/src/scenario_table.asm:40

Equ: GFX_BNDM2_LEFT1 = BITMAPS+480+640+160 MakeItEasy/src/scenario_table.asm:42

Referenced in:

Equ: GFX_BNDM2_LEFT2 = BITMAPS+480+640+160+80 MakeItEasy/src/scenario_table.asm:43

Referenced in:

Equ: GFX_FOREVER1 = BITMAPS+480+640+160+160 MakeItEasy/src/scenario_table.asm:44

Referenced in:
  • MakeItEasy/src/scenario_table.asm:606
    defw GFX_FOREVER1+10 
  • MakeItEasy/src/scenario_table.asm:647
    defw GFX_FOREVER1+10-1 

Equ: GFX_FOREVER2 = BITMAPS+480+640+160+240 MakeItEasy/src/scenario_table.asm:45

Referenced in:
  • MakeItEasy/src/scenario_table.asm:625
    defw GFX_FOREVER2+10
  • MakeItEasy/src/scenario_table.asm:663
    defw GFX_FOREVER2+10-1

Equ: STATIC_STILL1 = BITMAPS+480+640+160+240+80 MakeItEasy/src/scenario_table.asm:47

Referenced in:

Equ: STATIC_STILL2 = BITMAPS+480+640+160+240+80+80 MakeItEasy/src/scenario_table.asm:48

Referenced in:

Equ: STATIC_STILL3 = BITMAPS+480+640+160+240+80+80+80 MakeItEasy/src/scenario_table.asm:49

Referenced in:

Equ: STATIC_STILL4 = BITMAPS+480+640+160+240+80+80+80+80 MakeItEasy/src/scenario_table.asm:50

Referenced in:

Equ: LAST_LINE = BITMAPS+640+640+320+80+160+80 MakeItEasy/src/scenario_table.asm:52

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1669
    defw LAST_LINE+5
  • MakeItEasy/src/scenario_table.asm:1676
    defw LAST_LINE 
  • MakeItEasy/src/scenario_table.asm:1685
    defw LAST_LINE+5
  • MakeItEasy/src/scenario_table.asm:1692
    defw LAST_LINE
  • MakeItEasy/src/scenario_table.asm:1700
    defw LAST_LINE
  • MakeItEasy/src/scenario_table.asm:1708
    defw LAST_LINE-1+5 
  • MakeItEasy/src/scenario_table.asm:1717
    defw LAST_LINE-1
  • MakeItEasy/src/scenario_table.asm:1724
    defw LAST_LINE-1+5
  • MakeItEasy/src/scenario_table.asm:1731
    defw LAST_LINE-1
  • MakeItEasy/src/scenario_table.asm:1740
    defw LAST_LINE-1

Equ: GFX_M2_CREDITS_INT1_C5 = BITMAPS+1 MakeItEasy/src/scenario_table.asm:57

Referenced in:

Equ: GFX_CREDINT1 = BITMAPS+80+4 MakeItEasy/src/scenario_table.asm:58

Referenced in:

Equ: GFX_M2_CREDITS_INT2_C5 = BITMAPS+160+1 MakeItEasy/src/scenario_table.asm:59

Referenced in:

Equ: GFX_CREDINT2 = BITMAPS+80+160+4 MakeItEasy/src/scenario_table.asm:60

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1437
    defw GFX_CREDINT2+8

Equ: GFX_M2_CREDITS_POL1_C5 = BITMAPS+320 MakeItEasy/src/scenario_table.asm:61

Referenced in:

Equ: GFX_CREDPOL1 = BITMAPS+320+80+4 MakeItEasy/src/scenario_table.asm:62

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1503
    defw GFX_CREDPOL1+6
  • MakeItEasy/src/scenario_table.asm:1542
    defw GFX_CREDPOL1-1+6 

Equ: GFX_M2_CREDITS_POL2_C5 = BITMAPS+320+160 MakeItEasy/src/scenario_table.asm:63

Referenced in:

Equ: GFX_CREDPOL2 = BITMAPS+320+80+160+4 MakeItEasy/src/scenario_table.asm:64

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1519
    defw GFX_CREDPOL2+6
  • MakeItEasy/src/scenario_table.asm:1558
    defw GFX_CREDPOL2-1+6

Equ: GFX_M2_BND1 = BITMAPS+640 MakeItEasy/src/scenario_table.asm:65

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1095
    defw GFX_M2_BND1-1 
  • MakeItEasy/src/scenario_table.asm:1135
    defw GFX_M2_BND1-1-1

Equ: GFX_CREDTHIS1 = BITMAPS+640+80 MakeItEasy/src/scenario_table.asm:66

Referenced in:

Equ: GFX_M2_BND2 = BITMAPS+640+160 MakeItEasy/src/scenario_table.asm:67

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1111
    defw GFX_M2_BND2-1
  • MakeItEasy/src/scenario_table.asm:1118
    defw GFX_M2_BND2-1
  • MakeItEasy/src/scenario_table.asm:1149
    defw GFX_M2_BND2-1-1
  • MakeItEasy/src/scenario_table.asm:1156
    defw GFX_M2_BND2-1-1 

Equ: GFX_CREDTHIS2 = BITMAPS+640+160+80 MakeItEasy/src/scenario_table.asm:68

Referenced in:

Equ: GFX_STATIC1 = BITMAPS+640+320 MakeItEasy/src/scenario_table.asm:70

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1085
    defw GFX_STATIC1

Equ: GFX_STATIC2 = BITMAPS+640+320+80 MakeItEasy/src/scenario_table.asm:71

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1104
    defw GFX_STATIC2

Equ: GFX_STATIC3 = BITMAPS+640+320+160 MakeItEasy/src/scenario_table.asm:72

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1126
    defw GFX_STATIC3 

Equ: GFX_STATIC4 = BITMAPS+640+320+240 MakeItEasy/src/scenario_table.asm:73

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1142
    defw GFX_STATIC4

Equ: GFX_STATIC5 = BITMAPS+640+640 MakeItEasy/src/scenario_table.asm:75

Referenced in:
  • MakeItEasy/src/scenario_table.asm:687
    defw GFX_STATIC5+1 
  • MakeItEasy/src/scenario_table.asm:767
    defw GFX_STATIC5  
  • MakeItEasy/src/scenario_table.asm:1336
    defw GFX_STATIC5 

Equ: GFX_STATIC6 = BITMAPS+640+640+80 MakeItEasy/src/scenario_table.asm:76

Referenced in:
  • MakeItEasy/src/scenario_table.asm:705
    defw GFX_STATIC6+1
  • MakeItEasy/src/scenario_table.asm:786
    defw GFX_STATIC6
  • MakeItEasy/src/scenario_table.asm:1355
    defw GFX_STATIC6

Equ: GFX_STATIC7 = BITMAPS+640+640+160 MakeItEasy/src/scenario_table.asm:77

Referenced in:
  • MakeItEasy/src/scenario_table.asm:726
    defw GFX_STATIC7+1 
  • MakeItEasy/src/scenario_table.asm:807
    defw GFX_STATIC7 
  • MakeItEasy/src/scenario_table.asm:1377
    defw GFX_STATIC7

Equ: GFX_STATIC8 = BITMAPS+640+640+240 MakeItEasy/src/scenario_table.asm:78

Referenced in:
  • MakeItEasy/src/scenario_table.asm:742
    defw GFX_STATIC8+1
  • MakeItEasy/src/scenario_table.asm:823
    defw GFX_STATIC8
  • MakeItEasy/src/scenario_table.asm:1393
    defw GFX_STATIC8

Equ: GFX_GREETS1 = BITMAPS+640+640+320 MakeItEasy/src/scenario_table.asm:80

Equ: GFX_GREETS2 = BITMAPS+640+640+320 MakeItEasy/src/scenario_table.asm:81

Equ: GFX_SPACEM1_1 = BITMAPS+640+640+320 MakeItEasy/src/scenario_table.asm:82

Equ: HUGSM2_1 = BITMAPS+640+640+320 MakeItEasy/src/scenario_table.asm:84

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1253
    defw HUGSM2_1+10 
  • MakeItEasy/src/scenario_table.asm:1294
    defw HUGSM2_1+10-1 
  • MakeItEasy/src/scenario_table.asm:1346
    defw HUGSM2_1+7-6
  • MakeItEasy/src/scenario_table.asm:1386
    defw HUGSM2_1+7-6-1

Equ: GFX_SPACEM2_1 = BITMAPS+640+640+320+80 MakeItEasy/src/scenario_table.asm:86

Equ: GFX_GREETS160_1 = BITMAPS+640+640+320+80 MakeItEasy/src/scenario_table.asm:87

Referenced in:

Equ: HUGSM2_2 = BITMAPS+640+640+320+160 MakeItEasy/src/scenario_table.asm:89

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1272
    defw HUGSM2_2+10
  • MakeItEasy/src/scenario_table.asm:1310
    defw HUGSM2_2+10-1
  • MakeItEasy/src/scenario_table.asm:1362
    defw HUGSM2_2+7-6
  • MakeItEasy/src/scenario_table.asm:1369
    defw HUGSM2_2+7-6
  • MakeItEasy/src/scenario_table.asm:1400
    defw HUGSM2_2+7-6-1
  • MakeItEasy/src/scenario_table.asm:1409
    defw HUGSM2_2+7-6-1

Equ: GFX_GREETS160_2 = BITMAPS+640+640+320+80+160 MakeItEasy/src/scenario_table.asm:90

Referenced in:

Equ: GFX_M1_LOGO_BND1 = BITMAPS MakeItEasy/src/scenario_table.asm:94

Equ: GFX_M1_LOGO_BND2 = BITMAPS MakeItEasy/src/scenario_table.asm:95

Equ: GFX_WECODEM1_1 = BITMAPS MakeItEasy/src/scenario_table.asm:96

Referenced in:

Equ: GFX_WECODEM1_2 = BITMAPS+80 MakeItEasy/src/scenario_table.asm:97

Referenced in:

Equ: GFX_SPACE1 = BITMAPS+160 MakeItEasy/src/scenario_table.asm:98

Referenced in:
  • MakeItEasy/src/scenario_table.asm:777
    defw GFX_SPACE1-1  
  • MakeItEasy/src/scenario_table.asm:816
    defw GFX_SPACE1-1-1

Equ: GFX_BOEUF1 = BITMAPS+160+80 MakeItEasy/src/scenario_table.asm:99

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1178
    defw GFX_BOEUF1  
  • MakeItEasy/src/scenario_table.asm:1218
    defw GFX_BOEUF1-1

Equ: GFX_SPACE2 = BITMAPS+160+160 MakeItEasy/src/scenario_table.asm:100

Referenced in:
  • MakeItEasy/src/scenario_table.asm:793
    defw GFX_SPACE2-1
  • MakeItEasy/src/scenario_table.asm:800
    defw GFX_SPACE2-1
  • MakeItEasy/src/scenario_table.asm:830
    defw GFX_SPACE2-1-1
  • MakeItEasy/src/scenario_table.asm:838
    defw GFX_SPACE2-1-1

Equ: GFX_BOEUF2 = BITMAPS+160+160+80 MakeItEasy/src/scenario_table.asm:101

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1194
    defw GFX_BOEUF2
  • MakeItEasy/src/scenario_table.asm:1202
    defw GFX_BOEUF2
  • MakeItEasy/src/scenario_table.asm:1232
    defw GFX_BOEUF2-1
  • MakeItEasy/src/scenario_table.asm:1241
    defw GFX_BOEUF2-1

Equ: GFX_FEED1 = BITMAPS+160+160+160 MakeItEasy/src/scenario_table.asm:102

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1168
    defw GFX_FEED1+1+3  
  • MakeItEasy/src/scenario_table.asm:1209
    defw GFX_FEED1+1-1+3 

Equ: GFX_FEED2 = BITMAPS+160+160+160+80 MakeItEasy/src/scenario_table.asm:103

Referenced in:
  • MakeItEasy/src/scenario_table.asm:1187
    defw GFX_FEED2+1+3
  • MakeItEasy/src/scenario_table.asm:1225
    defw GFX_FEED2+1-1+3

Equ: GFX_C7_BND_M2_1 = BITMAPS+640 MakeItEasy/src/scenario_table.asm:105

Equ: GFX_C7_BND_M2_2 = BITMAPS+640+160 MakeItEasy/src/scenario_table.asm:107

Equ: SOURCE_GFX1_L = GFX_M0_CREDITS_INTRO+4 MakeItEasy/src/scenario_table.asm:111

Referenced in:

Equ: SOURCE_GFX3_R = GFX_BNDCP5 MakeItEasy/src/scenario_table.asm:119

Referenced in:

Equ: SOURCE_GFX4_R = GFX_M0_8BITLOVE MakeItEasy/src/scenario_table.asm:121

Equ: SOURCE_GFX5_R1 = GFX_M2_CREDITS_INVERTED1+1 MakeItEasy/src/scenario_table.asm:125

Equ: SOURCE_GFX5_R2 = GFX_M2_CREDITS_INVERTED2+1 MakeItEasy/src/scenario_table.asm:126

Equ: DESTINATION1 = &8000 MakeItEasy/src/scenario_table.asm:130

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:56
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:66
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_effets.asm:74
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:81
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_effets.asm:90
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_effets.asm:98
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_effets.asm:105
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_effets.asm:112
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_effets.asm:253
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:262
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_effets.asm:270
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:277
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_effets.asm:285
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_effets.asm:293
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_effets.asm:300
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_effets.asm:307
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_effets.asm:319
    defw DESTINATION1 
  • MakeItEasy/src/scenario_effets.asm:327
    defw DESTINATION1+&44
  • MakeItEasy/src/scenario_effets.asm:334
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_effets.asm:341
    defw DESTINATION1+&98+&44
  • MakeItEasy/src/scenario_effets.asm:349
    defw DESTINATION1+&131 
  • MakeItEasy/src/scenario_effets.asm:357
    defw DESTINATION1+&44+&131
  • MakeItEasy/src/scenario_effets.asm:364
    defw DESTINATION1+&98+&131
  • MakeItEasy/src/scenario_effets.asm:371
    defw DESTINATION1+&98+&44+&131
  • MakeItEasy/src/scenario_effets.asm:440
    defw DESTINATION1
  • MakeItEasy/src/scenario_effets.asm:441
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:159
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:168
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:181
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:191
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:199
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:206
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:212
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:222
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:230
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:237
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:244
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:252
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:448
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:458
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:466
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:473
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:481
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:490
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:498
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:505
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:512
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:519
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:608
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:618
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:626
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:633
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:641
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:649
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:657
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:664
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:671
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:679
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:769
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:779
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:787
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:794
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:801
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:809
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:817
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:824
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:831
    defw DESTINATION1+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:839
    defw DESTINATION1+&98+&43+&130   
  • MakeItEasy/src/scenario_table.asm:927
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:936
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:944
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:951
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:957
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:965
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:973
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:980
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:987
    defw DESTINATION1+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:994
    defw DESTINATION1+&98+&43+&130   
  • MakeItEasy/src/scenario_table.asm:1087
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1097
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1105
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1112
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1119
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1128
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1136
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1143
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1150
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1157
    defw DESTINATION1+&98+&43+&130            
  • MakeItEasy/src/scenario_table.asm:1255
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1265
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1273
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1280
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1288
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1296
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1304
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1311
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1318
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1326
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1422
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:1430
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1438
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1445
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1453
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1462
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1470
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1477
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1484
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1493
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1586
    defw DESTINATION1
  • MakeItEasy/src/scenario_table.asm:1594
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1602
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1609
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1617
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1626
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1634
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1641
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1648
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1657
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1752
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:1762
    defw DESTINATION1+&43 
  • MakeItEasy/src/scenario_table.asm:1771
    defw DESTINATION1+&98
  • MakeItEasy/src/scenario_table.asm:1778
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1784
    defw DESTINATION1+&98+&43
  • MakeItEasy/src/scenario_table.asm:1793
    defw DESTINATION1+&130 
  • MakeItEasy/src/scenario_table.asm:1801
    defw DESTINATION1+&43+&130
  • MakeItEasy/src/scenario_table.asm:1808
    defw DESTINATION1+&98+&130
  • MakeItEasy/src/scenario_table.asm:1815
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1823
    defw DESTINATION1+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:2001
    defw DESTINATION1 
  • MakeItEasy/src/scenario_table.asm:2010
    defw DESTINATION1 

Equ: DESTINATION2 = &8400 MakeItEasy/src/scenario_table.asm:131

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:383
    defw DESTINATION2 
  • MakeItEasy/src/scenario_effets.asm:391
    defw DESTINATION2+&44          
  • MakeItEasy/src/scenario_effets.asm:397
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_effets.asm:404
    defw DESTINATION2+&98+&44 
  • MakeItEasy/src/scenario_effets.asm:412
    defw DESTINATION2+&131 
  • MakeItEasy/src/scenario_effets.asm:420
    defw DESTINATION2+&44+&131
  • MakeItEasy/src/scenario_effets.asm:427
    defw DESTINATION2+&98+&131
  • MakeItEasy/src/scenario_effets.asm:434
    defw DESTINATION2+&98+&44+&131
  • MakeItEasy/src/scenario_table.asm:263
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:275
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:285
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:294
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:304
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:316
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:326
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:333
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:340
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:348
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:689
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:698
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:706
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:713
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:720
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:728
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:736
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:743
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:750
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:756
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:848
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:857
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:865
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:872
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:879
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:887
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:895
    defw DESTINATION2+&43+&130 
  • MakeItEasy/src/scenario_table.asm:902
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:909
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:916
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1170
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1180
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1188
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1195
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1203
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1211
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1219
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1226
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1233
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1242
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1338
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1348
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1356
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1363
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1370
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1379
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1387
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1394
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1401
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1410
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1504
    defw DESTINATION2
  • MakeItEasy/src/scenario_table.asm:1512
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1520
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1527
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1535
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1544
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1552
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1559
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1566
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1575
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1917
    defw DESTINATION2 
  • MakeItEasy/src/scenario_table.asm:1927
    defw DESTINATION2+&43 
  • MakeItEasy/src/scenario_table.asm:1935
    defw DESTINATION2+&98
  • MakeItEasy/src/scenario_table.asm:1942
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1950
    defw DESTINATION2+&98+&43
  • MakeItEasy/src/scenario_table.asm:1960
    defw DESTINATION2+&130 
  • MakeItEasy/src/scenario_table.asm:1968
    defw DESTINATION2+&43+&130
  • MakeItEasy/src/scenario_table.asm:1975
    defw DESTINATION2+&98+&130
  • MakeItEasy/src/scenario_table.asm:1982
    defw DESTINATION2+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1990
    defw DESTINATION2+&98+&43+&130 

Equ: DESTINATION3 = &C000 MakeItEasy/src/scenario_table.asm:132

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:188
    defw DESTINATION3 
  • MakeItEasy/src/scenario_effets.asm:197
    defw DESTINATION3+&43+1 
  • MakeItEasy/src/scenario_effets.asm:205
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_effets.asm:212
    defw DESTINATION3+&98+&43+1
  • MakeItEasy/src/scenario_effets.asm:220
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_effets.asm:228
    defw DESTINATION3+&43+&130+1
  • MakeItEasy/src/scenario_effets.asm:235
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_effets.asm:242
    defw DESTINATION3+&98+&43+&130+1
  • MakeItEasy/src/scenario_table.asm:1004
    defw DESTINATION3 
  • MakeItEasy/src/scenario_table.asm:1013
    defw DESTINATION3+&43 
  • MakeItEasy/src/scenario_table.asm:1021
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_table.asm:1028
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1036
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1043
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_table.asm:1051
    defw DESTINATION3+&43+&130
  • MakeItEasy/src/scenario_table.asm:1058
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_table.asm:1065
    defw DESTINATION3+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:1073
    defw DESTINATION3+&98+&43+&130    
  • MakeItEasy/src/scenario_table.asm:1670
    defw DESTINATION3
  • MakeItEasy/src/scenario_table.asm:1686
    defw DESTINATION3+&98
  • MakeItEasy/src/scenario_table.asm:1710
    defw DESTINATION3+&130 
  • MakeItEasy/src/scenario_table.asm:1725
    defw DESTINATION3+&98+&130
  • MakeItEasy/src/scenario_table.asm:1844
    defw DESTINATION3+&43 
  • MakeItEasy/src/scenario_table.asm:1859
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1867
    defw DESTINATION3+&98+&43
  • MakeItEasy/src/scenario_table.asm:1885
    defw DESTINATION3+&43+&130
  • MakeItEasy/src/scenario_table.asm:1899
    defw DESTINATION3+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1907
    defw DESTINATION3+&98+&43+&130

Equ: DESTINATION4 = &c400 MakeItEasy/src/scenario_table.asm:133

Referenced in:
  • MakeItEasy/src/scenario_effets.asm:123
    defw DESTINATION4 
  • MakeItEasy/src/scenario_effets.asm:132
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_effets.asm:140
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_effets.asm:147
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_effets.asm:155
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_effets.asm:163
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_effets.asm:170
    defw DESTINATION4+&98+&130
  • MakeItEasy/src/scenario_effets.asm:177
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:359
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:369
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:377
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:385
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:393
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:404
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:412
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:419
    defw DESTINATION4+&98+&130
  • MakeItEasy/src/scenario_table.asm:426
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:434
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:530
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:539
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:547
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:554
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:561
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:569
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:577
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:584
    defw DESTINATION4+&98+&130 
  • MakeItEasy/src/scenario_table.asm:591
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:598
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1678
    defw DESTINATION4+&43 
  • MakeItEasy/src/scenario_table.asm:1693
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:1701
    defw DESTINATION4+&98+&43
  • MakeItEasy/src/scenario_table.asm:1718
    defw DESTINATION4+&43+&130
  • MakeItEasy/src/scenario_table.asm:1732
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1741
    defw DESTINATION4+&98+&43+&130
  • MakeItEasy/src/scenario_table.asm:1834
    defw DESTINATION4 
  • MakeItEasy/src/scenario_table.asm:1852
    defw DESTINATION4+&98
  • MakeItEasy/src/scenario_table.asm:1877
    defw DESTINATION4+&130 
  • MakeItEasy/src/scenario_table.asm:1892
    defw DESTINATION4+&98+&130

Equ: MODE2_COL1 = 77 MakeItEasy/src/scenario_table.asm:138

Equ: MODE2_COL2 = 76 MakeItEasy/src/scenario_table.asm:139

Equ: MODE2_COL3 = 95 MakeItEasy/src/scenario_table.asm:140

Equ: MODE2_COL4 = 85 MakeItEasy/src/scenario_table.asm:141

Equ: TRANS_L_LENGTH = 34 MakeItEasy/src/scenario_table.asm:143

Referenced in:

Equ: TRANS_R_LENGTH = 41 MakeItEasy/src/scenario_table.asm:144

Referenced in:

Equ: extra_duration = 42 MakeItEasy/src/scenario_table.asm:145

Referenced in:

Equ: STATIC = 0 MakeItEasy/src/config.asm:8

Equ: MODE2 = &8e MakeItEasy/src/config.asm:10

Referenced in:
  • IntroHBL/src/intro_code.asm:2759
    defb MODE2,1 
  • IntroHBL/src/intro_code.asm:2770
    defb MODE2,1  
  • IntroHBL/src/intro_code.asm:2779
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2787
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2795
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2803
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2811
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2819
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2827
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2835
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2844
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2853
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2861
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2869
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2878
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2886
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2894
    defb MODE2,1   
  • IntroHBL/src/intro_code.asm:2902
    defb MODE2,1   
  • MakeItEasy/src/effets_scenario.asm:523
    ld l,MODE2

Equ: INK0 = 84 MakeItEasy/src/config.asm:12

Referenced in:
  • IntroHBL/src/intro_code.asm:2718
    defb INK0,BORDER_BOTTOM
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: INK1 = &5f MakeItEasy/src/config.asm:13

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2

Equ: B1 = 68 MakeItEasy/src/config.asm:16

Referenced in:
  • MakeItEasy/src/multimoderupture8_BAK.asm:533
    defb B1,B1,B1,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:534
    defb B1,B1,B2,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:535
    defb B1,B2,B1,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:536
    defb B2,B1,B1,B1

Equ: B2 = 85 MakeItEasy/src/config.asm:17

Referenced in:
  • MakeItEasy/src/palettes.asm:138
    defb 84,84,84,&44,&4c,&5c,&4e,&4d,&4a,&4b,B2     
  • MakeItEasy/src/multimoderupture8.asm:362
    defb INK0,INK1,&58,&5d,68,74,95,68,&43,77,88,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:527
    defb INK0,INK1,76,78,87,74,90,89,&43,&59,&4f,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:533
    defb B1,B1,B1,B2
  • MakeItEasy/src/multimoderupture8_BAK.asm:534
    defb B1,B1,B2,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:535
    defb B1,B2,B1,B1
  • MakeItEasy/src/multimoderupture8_BAK.asm:536
    defb B2,B1,B1,B1

Equ: R5 = 0 MakeItEasy/src/config.asm:19

Referenced in:
  • MakeItEasy/src/multimoderupture8.asm:192
    ld a,8-R5
  • MakeItEasy/src/exit.asm:37
    ld a,0+R5
  • MakeItEasy/src/multimoderupture8_BAK.asm:252
    ld a,8-R5

Equ: .palette_address = $-2 MakeItEasy/src/loading_screen.asm:59

Referenced in:
  • IntroHBL/src/intro_loader.asm:71
    ld hl, (.palette_address)
  • IntroHBL/src/intro_loader.asm:74
    ld (.palette_address), hl
  • polar_dots/src/polar_loader.asm:71
    ld hl, (.palette_address)
  • polar_dots/src/polar_loader.asm:74
    ld (.palette_address), hl
  • MakeItEasy/src/loading_screen.asm:62
    ld hl, (.palette_address)
  • MakeItEasy/src/loading_screen.asm:65
    ld (.palette_address), hl

Equ: .wait = $-1 MakeItEasy/src/loading_screen.asm:66

Referenced in:
  • linking/src/load_outer_space.asm:74
    ld (.wait), a
  • linking/src/load_make_it_easy.asm:136
    ld (.wait), a
  • IntroHBL/src/intro_loader.asm:69
    ld (.wait), a
  • polar_dots/src/scenario.asm:5
    ld (.wait), hl
  • polar_dots/src/scenario.asm:18
    ld (.wait), de
  • polar_dots/src/polar_loader.asm:69
    ld (.wait), a
  • MakeItEasy/src/loading_screen.asm:60
    ld (.wait), a

Equ: length = $-start MakeItEasy/src/dsk_multimoderupture8_join.asm:10

Referenced in:
  • linking/src/demosystem/linker_common.asm:100
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:100
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:139
    		.length = $-.start
  • linking/src/demosystem/linker_common.asm:144
    		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length
  • linking/src/demosystem/linker_common.asm:144
    		assert BASM_LATEST_CRUNCH_OUTPUT_DATA_SIZE == .length
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:156
    		print "CRUNCHED ", {fname}, " FROM ", .uncrunched_length, " BYTES TO ", .length, " BYTES IN [", {h...
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:184
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:198
    				assert {to} + {from}.length < {from}.start
  • linking/src/demosystem/linker_common.asm:201
    				assert {to} >= {moved_from} + {from}.length + {from}.delta
  • linking/src/demosystem/linker_common.asm:201
    				assert {to} >= {moved_from} + {from}.length + {from}.delta
  • linking/src/demosystem/linker_common.asm:219
    			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into accoun...
  • linking/src/demosystem/linker_common.asm:219
    			assert {to} >= {moved_from} + {from}.length | {to} < {moved_from} ; BUG does not take into accoun...
  • linking/src/demosystem/linker_common.asm:253
    		ld hl, {moved_from} +  {from}.length - 1
  • linking/src/demosystem/linker_common.asm:253
    		ld hl, {moved_from} +  {from}.length - 1
  • linking/src/demosystem/linker_common.asm:300
    		ld bc, {from}.length
  • linking/src/demosystem/linker_common.asm:300
    		ld bc, {from}.length